Found while working on Bug 37398. To recreate: 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
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