Bugzilla – Attachment 115160 Details for
Bug 27427
Update the way form validation errors are displayed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27427: (follow-up) Add validation trigger to datepicker
Bug-27427-follow-up-Add-validation-trigger-to-date.patch (text/plain), 1.18 KB, created by
Owen Leonard
on 2021-01-14 13:32:34 UTC
(
hide
)
Description:
Bug 27427: (follow-up) Add validation trigger to datepicker
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-01-14 13:32:34 UTC
Size:
1.18 KB
patch
obsolete
>From 3ab85b481f4667f51bc5b701d80880c95acba185 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 14 Jan 2021 13:30:54 +0000 >Subject: [PATCH] Bug 27427: (follow-up) Add validation trigger to datepicker > >This patch adds a default action to the datepicker plugin, triggering an >"onSelect" event which checks to see if the field is valid according to >the jQuery validation plugin. > >This change attempts to fix a problem where validation isn't triggered >by the typical onkeyup or blur events because the field is updated by >the datepicker plugin. >--- > koha-tmpl/intranet-tmpl/prog/js/calendar.js | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/calendar.js b/koha-tmpl/intranet-tmpl/prog/js/calendar.js >index 1f312e813d..41e6dd4e9c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/calendar.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/calendar.js >@@ -127,6 +127,11 @@ jQuery(function ($) { > yearSuffix: '' > }; > $.datepicker.setDefaults($.datepicker.regional['']); >+ $.datepicker.setDefaults({ >+ onSelect: function () { >+ $(this).valid(); >+ } >+ }); > }); > > /* jQuery Validator plugin custom method >-- >2.11.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 27427
:
115118
| 115160