Lines 42-54
my $builder = sub {
Link Here
|
42 |
\$(document).ready(function(){ |
42 |
\$(document).ready(function(){ |
43 |
\$("#$function_name").flatpickr({ |
43 |
\$("#$function_name").flatpickr({ |
44 |
onOpen: function(selectedDates, dateStr, instance) { |
44 |
onOpen: function(selectedDates, dateStr, instance) { |
|
|
45 |
if (dateStr == '') { |
46 |
instance.setDate(new Date()); |
47 |
} |
48 |
}, |
49 |
onChange: function(selectedDates, dateStr, instance) { |
45 |
let options = maskitoDateOptionsGenerator({ |
50 |
let options = maskitoDateOptionsGenerator({ |
46 |
mode: altinput_dateformat, |
51 |
mode: altinput_dateformat, |
47 |
separator: delimiter, |
52 |
separator: delimiter, |
|
|
53 |
overwriteMode: 'replace', |
48 |
}); |
54 |
}); |
49 |
if (dateStr == '') { |
55 |
|
50 |
instance.setDate(new Date()); |
|
|
51 |
} |
52 |
new Maskito( instance.altInput, options ); |
56 |
new Maskito( instance.altInput, options ); |
53 |
} |
57 |
} |
54 |
}); |
58 |
}); |
55 |
- |
|
|