Bug 36342

Summary: Allow entering date ranges directly in bookings
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: Staff interfaceAssignee: Lucas Gass (lukeg) <lucas>
Status: RESOLVED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: david, gmcharlt, lisette, lucas, marie.hedbom, paul.derscheid
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function: bookings
Bug Depends on: 29002, 33703    
Bug Blocks:    
Attachments: Bug 36342: Add Maskito date range support
Bug 36342: Add Maskito date range support

Description Martin Renvoize (ashimema) 2024-03-18 13:05:04 UTC
We add input masking to flatpickr in bug 33703 but we explicitly disable it for the range case which is used in bookings.

There are options to support this in the Maskito library too, so we could consider adding it back for bookings inputs too.
Comment 1 Lucas Gass (lukeg) 2024-04-18 14:26:48 UTC
+1. Happy to work on this Martin.
Comment 2 Lucas Gass (lukeg) 2024-04-23 19:55:50 UTC
Created attachment 165441 [details] [review]
Bug 36342: Add Maskito date range support

To test:
1. Make some items bookable by going to catalogue/moredetail.pl?biblionumber=X
2. On the toolbar for that record you should now see "Place booking"
3. Try placing a booking and adding the date range for "Booking dates" manually.
4. Play with the DateFormat system preference to make sure this works for all supported date formats.
Comment 3 David Nind 2024-05-25 19:36:50 UTC
Created attachment 167180 [details] [review]
Bug 36342: Add Maskito date range support

To test:
1. Make some items bookable by going to catalogue/moredetail.pl?biblionumber=X
2. On the toolbar for that record you should now see "Place booking"
3. Try placing a booking and adding the date range for "Booking dates" manually.
4. Play with the DateFormat system preference to make sure this works for all supported date formats.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2024-05-25 19:37:40 UTC
Testing notes (using KTD):

1. Example formats used to enter date range directly for bookings:

05/29/2024 to 05/31/2024
29.05.2024 to 31.05.2024
29/05/2024 to 31/05/2024
2024-05-29 to 2024-05-31
Comment 5 Paul Derscheid 2024-10-23 07:51:58 UTC
Doesn't apply anymore :/