Bugzilla – Attachment 172186 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.40 KB, created by
Phil Ringnalda
on 2024-09-27 21:47:44 UTC
(
hide
)
Description:
Bug 38027: Set date to empty value instead of using flatpickr clear()
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2024-09-27 21:47:44 UTC
Size:
1.40 KB
patch
obsolete
>From f62685b67d6b083104be43be3c72d36c06dfb8ad 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 > >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >--- > 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 9f1cdb6ceb..95234ba8e3 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.44.0
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