When working with date ranges in the calendar it would be nice if it was not possible to select dates in the past from the starting date.
I looked into this and only calendar I could find allowing past date pick was one used to suspend all holds in circulation.tt and moremember.tt. Are there any other templates with this problem?
Hi Emmi, the calendar meant here is the holiday calendar under tools.
Oh I see, sorry for misunderstanding. I'll write separate bug for that holds calendar then.
No need to be sorry, thx for looking into this!
Created attachment 91456 [details] [review] Bug 22272 - Calendar: When entering date ranges grey out dates in the past from the start date In "Calendar" tool it's possible to pick dates before start date as end date. This patch sets end date calendars "minDate" as picked start day to grey out past dates. Also reindents datepicker code for better readability. Test plan: - Apply this patch - Set start date from first calendar - Set end date from second calendar => Dates before start date are greyed out
Created attachment 91722 [details] [review] Good enhancment, works well and passes qa tools. signing off Bug 22272 - Calendar: When entering date... ...ranges grey out dates in the past from the start date In "Calendar" tool it's possible to pick dates before start date as end date. This patch sets end date calendars "minDate" as picked start day to grey out past dates. Also reindents datepicker code for better readability. Test plan: - Apply this patch - Set start date from first calendar - Set end date from second calendar => Dates before start date are greyed out Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Created attachment 91839 [details] [review] Bug 22272 - Calendar: When entering date... ...ranges grey out dates in the past from the start date In "Calendar" tool it's possible to pick dates before start date as end date. This patch sets end date calendars "minDate" as picked start day to grey out past dates. Also reindents datepicker code for better readability. Test plan: - Apply this patch - Set start date from first calendar - Set end date from second calendar => Dates before start date are greyed out Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com>
Celaned up the bug a bit as the same patch was attached several times and something happened to the subject. Will apply a cleaned up patch with all sign-off lines. Emmi, I notice that you use: Emmi <emmi.takkinen@outlook.com> That will make you show up as "Emmi" without your last name in the release notes. Not sure if this was intended or if you might like to update your git configuration!
Created attachment 92105 [details] [review] Bug 22272: Calendar: When entering date ranges grey out dates in the past from the start date In "Calendar" tool it's possible to pick dates before start date as end date. This patch sets end date calendars "minDate" as picked start day to grey out past dates. Also reindents datepicker code for better readability. Test plan: - Apply this patch - Set start date from first calendar - Set end date from second calendar => Dates before start date are greyed out Signed-off-by: Nadine Pierre <nadine.pierre@inLibro.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work! Pushed to master for 19.11.00
Patch only adds the line : $("#dateofrange").datepicker( "option", "minDate", $(this).datepicker("getDate")); //ensure end date can't be before start date Other changes are just spaces changes.
Pushed to 19.05.x for 19.05.04
enhancement, choosing not to backport to 18.11.x