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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-4 / +7 lines)
Lines 71-79 Link Here
71
                });
71
                });
72
        },
72
        },
73
        onChange: function( selectedDates, dateText, instance) {
73
        onChange: function( selectedDates, dateText, instance) {
74
            let parsedDate = flatpickr.parseDate(dateText, instance.config.dateFormat);
74
            var thisInput = instance.input;
75
            if ( !parsedDate.getHours() ) {
75
            let = accepts_time = $(thisInput).data('flatpickr-enable-time');
76
                instance.setDate(selectedDates[0].setHours(23, 59, 0, 0));
76
            if ( accepts_time ) {
77
                let parsedDate = flatpickr.parseDate(dateText, instance.config.dateFormat);
78
                if ( !parsedDate.getHours() ) {
79
                    instance.setDate(selectedDates[0].setHours(23, 59, 0, 0));
80
                }
77
            }
81
            }
78
        },
82
        },
79
        onClose: function( selectedDates, dateText, instance) {
83
        onClose: function( selectedDates, dateText, instance) {
80
- 

Return to bug 35014