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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc (-1 / +11 lines)
Lines 114-119 Link Here
114
                    }
114
                    }
115
                }
115
                }
116
                new Maskito( instance.altInput, maskitoOptions );
116
                new Maskito( instance.altInput, maskitoOptions );
117
118
                /* If there is a node with data-date_to with the id of this node it means we are instantiating a 'from' for a date range */
119
                const toInput = instance.input;
120
                const fromInput = document.querySelector(`[data-date_to='${toInput.id}']`);
121
                if (fromInput && fromInput._flatpickr) {
122
                    const fromDate = fromInput._flatpickr.selectedDates[0];
123
                    if (fromDate) {
124
                        instance.set('minDate', fromDate);
125
                    }
126
                }
127
117
            },
128
            },
118
            onChange: function( selectedDates, dateText, instance) {
129
            onChange: function( selectedDates, dateText, instance) {
119
                if (selectedDates.length === 0) {
130
                if (selectedDates.length === 0) {
120
- 

Return to bug 36136