Summary: | Clearing a flatpickr datetime causes errors | ||
---|---|---|---|
Product: | Koha | Reporter: | Lucas Gass (lukeg) <lucas> |
Component: | Architecture, internals, and plumbing | Assignee: | Lucas Gass (lukeg) <lucas> |
Status: | RESOLVED FIXED | QA Contact: | Julian Maurice <julian.maurice> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jesse, julian.maurice, phil |
Version: | Main | ||
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: |
24.11.00,24.05.06,23.11.11
|
Circulation function: | |
Bug Depends on: | |||
Bug Blocks: | 37398 | ||
Attachments: |
Bug 38027: Set date to empty value instead of using flatpickr clear()
Bug 38027: Set date to empty value instead of using flatpickr clear() Bug 38027: Set date to empty value instead of using flatpickr clear() Bug 38027: (QA follow-up) Fix flatpickr onChange when input is cleared |
Description
Lucas Gass (lukeg)
2024-09-27 20:06:09 UTC
Created attachment 172185 [details] [review] Bug 38027: Set date to empty value instead of using flatpickr clear() 1. Find a datetime field in Koha. For example, specifying due dates on the checkout page. 2. Specify a datetime. 3. Use the red 'X' icon to clear the date. 4. Notice a console error 'parsedDate' is undef 5. Now the flatpickr is date, not datetime 6. APPLY patch 7. Try again, this time no console error and the flatpickr remains a datetime one Created attachment 172186 [details] [review] Bug 38027: Set date to empty value instead of using flatpickr clear() 1. Find a datetime field in Koha. For example, specifying due dates on the checkout page. 2. Specify a datetime. 3. Use the red 'X' icon to clear the date. 4. Notice a console error 'parsedDate' is undef 5. Now the flatpickr is date, not datetime 6. APPLY patch 7. Try again, this time no console error and the flatpickr remains a datetime one Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Created attachment 172400 [details] [review] Bug 38027: Set date to empty value instead of using flatpickr clear() 1. Find a datetime field in Koha. For example, specifying due dates on the checkout page. 2. Specify a datetime. 3. Use the red 'X' icon to clear the date. 4. Notice a console error 'parsedDate' is undef 5. Now the flatpickr is date, not datetime 6. APPLY patch 7. Try again, this time no console error and the flatpickr remains a datetime one Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Created attachment 172401 [details] [review] Bug 38027: (QA follow-up) Fix flatpickr onChange when input is cleared With the onChange event handler fixed, it's ok to call clear() instead of setDate('') Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.06 Pushed to 23.11.x for 23.11.11 Not pushed to LTS(22.11.x). Backport only major critical and security issues. Marked Resolved |