View | Details | Raw Unified | Return to bug 37371
Collapse All | Expand All

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

Return to bug 37371