Bug 22272 - Calendar: When entering date ranges grey out dates in the past from the start date
Summary: Calendar: When entering date ranges grey out dates in the past from the start...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Emmi Takkinen
QA Contact: Testopia
URL:
Keywords:
Depends on: 21885
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-04 22:00 UTC by Katrin Fischer
Modified: 2020-11-30 21:44 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.04


Attachments
Bug 22272 - Calendar: When entering date ranges grey out dates in the past from the start date (5.09 KB, patch)
2019-07-11 07:02 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Good enhancment, works well and passes qa tools. signing off (5.16 KB, patch)
2019-07-22 22:32 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 22272 - Calendar: When entering date... ...ranges grey out dates in the past from the start date (5.15 KB, patch)
2019-07-26 18:51 UTC, Nadine Pierre
Details | Diff | Splinter Review
Bug 22272: Calendar: When entering date ranges grey out dates in the past from the start date (5.26 KB, patch)
2019-08-09 07:14 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2019-02-04 22:00:05 UTC
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.
Comment 1 Emmi Takkinen 2019-07-05 06:20:00 UTC
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?
Comment 2 Katrin Fischer 2019-07-05 06:24:08 UTC
Hi Emmi, the calendar meant here is the holiday calendar under tools.
Comment 3 Emmi Takkinen 2019-07-05 07:05:30 UTC
Oh I see, sorry for misunderstanding. I'll write separate bug for that holds calendar then.
Comment 4 Katrin Fischer 2019-07-05 08:21:54 UTC
No need to be sorry, thx for looking into this!
Comment 5 Emmi Takkinen 2019-07-11 07:02:33 UTC
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
Comment 6 Lucas Gass 2019-07-22 22:32:32 UTC
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>
Comment 7 Nadine Pierre 2019-07-26 18:51:37 UTC
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>
Comment 8 Katrin Fischer 2019-08-09 07:11:12 UTC
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!
Comment 9 Katrin Fischer 2019-08-09 07:14:12 UTC
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>
Comment 10 Martin Renvoize 2019-08-13 13:37:45 UTC
Nice work!

Pushed to master for 19.11.00
Comment 11 Fridolin Somers 2019-09-02 13:56:08 UTC
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.
Comment 12 Fridolin Somers 2019-09-02 13:56:47 UTC
Pushed to 19.05.x for 19.05.04
Comment 13 Lucas Gass 2019-09-17 20:13:33 UTC
enhancement, choosing not to backport to 18.11.x