Bug 35014

Summary: Times should only be set for enable-time flatpickrs
Product: Koha Reporter: Martin Renvoize (ashimema) <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Martin Renvoize (ashimema) <martin.renvoize>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: major    
Priority: P5 - low CC: fridolin.somers, lucas
Version: MainKeywords: rel_23_11_candidate
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.05,22.11.11
Circulation function:
Bug Depends on: 34939    
Bug Blocks:    
Attachments: Bug 35014: Only set time for enable-time flatpickr
Bug 35014: Only set time for enable-time flatpickr
Bug 35014: Only set time for enable-time flatpickr

Description Martin Renvoize (ashimema) 2023-10-09 15:35:51 UTC
Bug 34539 added code to auto-set the time element to 23:59 when a manually entered date is entered into a flatpickr input.

However.. it neglected to ONLY set this default for time enabled flatpickrs and instead sets it for all.
Comment 1 Martin Renvoize (ashimema) 2023-10-09 15:38:33 UTC
Created attachment 156750 [details] [review]
Bug 35014: Only set time for enable-time flatpickr

This patch adds a check to the onChange function such that we only
attempt to set the default time on change for time enabled flatpickrs
when the date is entered manually.
Comment 2 Lucas Gass (lukeg) 2023-10-09 16:01:08 UTC
Created attachment 156753 [details] [review]
Bug 35014: Only set time for enable-time flatpickr

This patch adds a check to the onChange function such that we only
attempt to set the default time on change for time enabled flatpickrs
when the date is entered manually.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Katrin Fischer 2023-10-09 20:14:42 UTC
Created attachment 156767 [details] [review]
Bug 35014: Only set time for enable-time flatpickr

This patch adds a check to the onChange function such that we only
attempt to set the default time on change for time enabled flatpickrs
when the date is entered manually.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Tomás Cohen Arazi (tcohen) 2023-10-10 13:02:23 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 5 Fridolin Somers 2023-10-12 20:51:26 UTC
Strange to see Bug 34539 as dependancy since it is NEW

Can this be backported ?
Comment 6 Martin Renvoize (ashimema) 2023-10-13 06:14:27 UTC
Hmm, I thought I'd removed that dependency.. it was a typo on my part when first opening the bug.. I suspect a bugzilla conflict put it back again.
Comment 7 Fridolin Somers 2023-11-02 20:27:09 UTC
Pushed to 23.05.x for 23.05.05
Comment 8 Matt Blenkinsop 2023-11-03 14:06:50 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x