Bugzilla – Attachment 170312 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.35 KB, created by
Paul Derscheid
on 2024-08-14 09:32:30 UTC
(
hide
)
Description:
Bug 37643: Check for NaN instead of truthiness if calendar.inc accepts_time
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2024-08-14 09:32:30 UTC
Size:
1.35 KB
patch
obsolete
>From 178931f67a15e0de0634fa4456792c2aa5aae313 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 > >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 >--- > 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.46.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 37643
:
170312
|
170315
|
170430