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>
This commit is contained in:
Lucas Gass 2024-09-27 21:17:49 +00:00 committed by Katrin Fischer
parent 0546217cdc
commit 4d4337bbed
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
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)