Bug 6663

Summary: would be nice to put ranges of dates in the calendar
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: ToolsAssignee: Christophe Croullebois <christophe.croullebois>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: PATCH-Sent (DO NOT USE) CC: katrin.fischer, paul.poulain, stephane.delaye
Version: 3.6   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 7964    
Bug Blocks:    
Attachments: Allow to select a range between 2 dates for holiday
Add a datepicker for "to date" in a range selection
Signed-off patch

Description Nicole C. Engard 2011-08-02 18:53:10 UTC
Would be nice if in the calendar I could say we're closed the 1st-3rd. Right now that's not an option with repeatable holidays or unique holidays.
Comment 1 Paul Poulain 2011-08-03 12:22:25 UTC
Christophe made something for this. It's still to be tested though, maybe christophe you could format your patch, attach it here, and Nicole will test it (and propose better wordings as you did, because I saw some words that seemed odd ... even to me...)
Comment 2 Christophe Croullebois 2011-08-03 15:12:02 UTC
(In reply to comment #1)
> Christophe made something for this. It's still to be tested though, maybe
> christophe you could format your patch, attach it here, and Nicole will test it
> (and propose better wordings as you did, because I saw some words that seemed
> odd ... even to me...)

Ok Paul, I'll do that.
But some stuff in holidays.tmpl need to be rewrited in holidays.tt, this WE I think...
Comment 3 Christophe Croullebois 2011-12-02 15:29:59 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2011-12-02 15:58:26 UTC
Could we use the datepicker widget for the "To Date" instead of the three separate inputs?
Comment 5 Christophe Croullebois 2011-12-02 16:23:13 UTC
Owen, 
it would be better of course...
My patch is very basic, so, no in this state.
But I'll try to code that.
Thx for comment.
Comment 6 Katrin Fischer 2011-12-03 20:30:17 UTC
Entering unique and repeating date ranges works for me, but I agree with Owen that a date picker would be more consistent and easier to manage.

I noticed that the 'today' button on the calendar is broken.
Comment 7 Christophe Croullebois 2011-12-04 21:07:51 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2011-12-05 20:41:59 UTC
Created attachment 6586 [details] [review]
Signed-off patch
Comment 9 Owen Leonard 2011-12-05 20:45:55 UTC
This looks good. A couple of possible future improvements:

- Prevent the user from choosing a date which falls before the "From Date"
- Only show the "To Date" if one of the "range" options is selected
Comment 10 Christophe Croullebois 2011-12-06 08:38:36 UTC
It's right Owen,
I have thought about a hidding of "To Date:" when the "range" options is not selected.
But not about a check on the "to date" integrity.
The best would be with a "grey-zone" calandar, but I am not sure with this one if I am able to do that, anyway at least a warning message would be usefull.
So, thx Owen, Katrin, I'll try to code the suggestions of Owen.
Comment 11 Paul Poulain 2011-12-13 14:13:24 UTC
QA comment :
* code OK
* works fine
* perlcritic OK
* prove xt/author/translatable-templates.t OK

passed QA

Patch pushed, please test
Comment 12 delaye 2012-03-09 15:44:59 UTC
*** Bug 7681 has been marked as a duplicate of this bug. ***
Comment 13 Jared Camins-Esakov 2012-05-24 00:58:35 UTC
This was incorporated into 3.6.x prior to 3.6.4.