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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4d4337bbed)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2024-09-27 21:17:49 +00:00
parent c41dacb551
commit 11e025e40a
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@
.addClass("clear_date")
.on("click", function(e){
e.preventDefault();
instance.input.flatpickr().clear();
instance.setDate('');
})
.addClass("fa fa-fw fa-times")
.attr("aria-hidden", true)