We are displaying all the dates from the date picker widget, we should display future dates only.
Created attachment 138406 [details] [review] Bug 31261: Disable dates in the past for curbside pickups When creating a new pickup the dates in the past won't display any available slots. It would be better to disable them in the date picker. Test plan: Setup curbside pickups for your library (see bug 30650 test plan if needed) Create a new pickup (staff and OPAC) and confirm that the date picker widget has the dates in the past disabled. QA note: More work would be needed to sync calendar.inc code between OPAC and staff. Also note that the "clear date" code wasn't needed (please confirm). Sponsored-by: Association KohaLa - https://koha-fr.org/
I have configured from 1:00 to 23:55 with 10 minute slots, but I can no longer pick pickup slots from today in the calendar. OPAC and staff show the same behaviour.
Well, yes, that's what the bug said :) It was misleading then, and it means we need way more code for this edge case.
I am not sure if it's intended to be able to schedule for today,... but in testing it made sense and could have been a few hours away.
Created attachment 143182 [details] [review] Bug 31261: Disable dates in the past for curbside pickups When creating a new pickup the dates in the past won't display any available slots. It would be better to disable them in the date picker. Test plan: Setup curbside pickups for your library (see bug 30650 test plan if needed) Create a new pickup (staff and OPAC) and confirm that the date picker widget has the dates in the past disabled. QA note: More work would be needed to sync calendar.inc code between OPAC and staff. Also note that the "clear date" code wasn't needed (please confirm). Sponsored-by: Association KohaLa - https://koha-fr.org/
Created attachment 143183 [details] [review] Bug 31261: Introduce flatpickr-futureinclusive That let us use future + today, and it's working perfectly for our use case :) Sponsored-by: Association KohaLa - https://koha-fr.org/
Created attachment 143201 [details] [review] Bug 31261: Disable dates in the past for curbside pickups When creating a new pickup the dates in the past won't display any available slots. It would be better to disable them in the date picker. Test plan: Setup curbside pickups for your library (see bug 30650 test plan if needed) Create a new pickup (staff and OPAC) and confirm that the date picker widget has the dates in the past disabled. QA note: More work would be needed to sync calendar.inc code between OPAC and staff. Also note that the "clear date" code wasn't needed (please confirm). Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: David Nind <david@davidnind.com>
Created attachment 143203 [details] [review] Bug 31261: Introduce flatpickr-futureinclusive That let us use future + today, and it's working perfectly for our use case :) Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: David Nind <david@davidnind.com>
Created attachment 143804 [details] [review] Bug 31261: Disable dates in the past for curbside pickups When creating a new pickup the dates in the past won't display any available slots. It would be better to disable them in the date picker. Test plan: Setup curbside pickups for your library (see bug 30650 test plan if needed) Create a new pickup (staff and OPAC) and confirm that the date picker widget has the dates in the past disabled. QA note: More work would be needed to sync calendar.inc code between OPAC and staff. Also note that the "clear date" code wasn't needed (please confirm). Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 143805 [details] [review] Bug 31261: Introduce flatpickr-futureinclusive That let us use future + today, and it's working perfectly for our use case :) Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Really helpful enh bordering on a bug fix (scheduling something in the past doesn't make sense) :) Touches templates, but doesn't change strings.
Pushed to master for 22.11. Nice work everyone, thanks!