Bugzilla – Attachment 172400 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.46 KB, created by
Julian Maurice
on 2024-10-04 14:09:51 UTC
(
hide
)
Description:
Bug 38027: Set date to empty value instead of using flatpickr clear()
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2024-10-04 14:09:51 UTC
Size:
1.46 KB
patch
obsolete
>From b92b31354b98dfd2bd14c6aed6939b7eddc9a9ed 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> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > 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 8280be9ba9..1d6958f8aa 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