Bug 37371: Move Maskito init to onReady in dateaccessioned.pl
Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
0f04c9a26a
commit
f723c33d48
1 changed files with 6 additions and 2 deletions
|
@ -41,15 +41,19 @@ my $builder = sub {
|
||||||
|
|
||||||
\$(document).ready(function(){
|
\$(document).ready(function(){
|
||||||
\$("#$function_name").flatpickr({
|
\$("#$function_name").flatpickr({
|
||||||
onOpen: function(selectedDates, dateStr, instance) {
|
onReady: function(selectedDates, dateStr, instance) {
|
||||||
let options = maskitoDateOptionsGenerator({
|
let options = maskitoDateOptionsGenerator({
|
||||||
mode: altinput_dateformat,
|
mode: altinput_dateformat,
|
||||||
separator: delimiter,
|
separator: delimiter,
|
||||||
|
overwriteMode: 'replace',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
new Maskito( instance.altInput, options );
|
||||||
|
},
|
||||||
|
onOpen: function(selectedDates, dateStr, instance) {
|
||||||
if (dateStr == '') {
|
if (dateStr == '') {
|
||||||
instance.setDate(new Date());
|
instance.setDate(new Date());
|
||||||
}
|
}
|
||||||
new Maskito( instance.altInput, options );
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue