Bugzilla – Attachment 170430 Details for
Bug 37643
Check for NaN instead of truthiness if calendar.inc accepts_time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37643: Check for NaN instead of truthiness if calendar.inc accepts_time
Bug-37643-Check-for-NaN-instead-of-truthiness-if-c.patch (text/plain), 1.49 KB, created by
Marcel de Rooy
on 2024-08-16 07:18:23 UTC
(
hide
)
Description:
Bug 37643: Check for NaN instead of truthiness if calendar.inc accepts_time
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-08-16 07:18:23 UTC
Size:
1.49 KB
patch
obsolete
>From 983fcaec7f3180244a7be1af703eda3756804993 Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Wed, 14 Aug 2024 09:24:49 +0000 >Subject: [PATCH] Bug 37643: Check for NaN instead of truthiness if > calendar.inc accepts_time >Content-Type: text/plain; charset=utf-8 > >To test: >1) Go to circulation.pl (checking out to a patron) >2) Click the settings in the barcode input >3) Set any due date with the time set to 00:00 >4) Note that the picker resets the time to 23:59 >5) Apply the patch >6) Repeat 1-3 >7) Note that the time (00:00) stays put >8) Sign off > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 8d60a21370..9f1cdb6ceb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -116,7 +116,7 @@ > if ( !accepts_period ) { > if ( accepts_time ) { > let parsedDate = flatpickr.parseDate(dateText, instance.config.dateFormat); >- if ( !parsedDate.getHours() ) { >+ if ( Number.isNaN(parsedDate.getHours()) ) { > instance.setDate(selectedDates[0].setHours(23, 59, 0, 0)); > } > } >-- >2.30.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 37643
:
170312
|
170315
| 170430