Bugzilla – Attachment 172185 Details for
Bug 38027
Clearing a flatpickr datetime causes errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38027: Set date to empty value instead of using flatpickr clear()
Bug-38027-Set-date-to-empty-value-instead-of-using.patch (text/plain), 1.35 KB, created by
Lucas Gass (lukeg)
on 2024-09-27 21:20:34 UTC
(
hide
)
Description:
Bug 38027: Set date to empty value instead of using flatpickr clear()
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-09-27 21:20:34 UTC
Size:
1.35 KB
patch
obsolete
>From 9ad666b815ff2a3dbfdc2901d2518d9d66488901 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 27 Sep 2024 21:17:49 +0000 >Subject: [PATCH] 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 >--- > koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index 9f1cdb6ceb2..95234ba8e3c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -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) >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38027
:
172185
|
172186
|
172400
|
172401