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 115-120 Link Here
115
                    }
115
                    }
116
                }
116
                }
117
                new Maskito( instance.altInput, maskitoOptions );
117
                new Maskito( instance.altInput, maskitoOptions );
118
119
                /* 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 */
120
                const toInput = instance.input;
121
                const fromInput = document.querySelector(`[data-date_to='${toInput.id}']`);
122
                if (fromInput && fromInput._flatpickr) {
123
                    const fromDate = fromInput._flatpickr.selectedDates[0];
124
                    if (fromDate) {
125
                        instance.set('minDate', fromDate);
126
                    }
127
                }
128
118
            },
129
            },
119
            onChange: function( selectedDates, dateText, instance) {
130
            onChange: function( selectedDates, dateText, instance) {
120
                if (selectedDates.length === 0) {
131
                if (selectedDates.length === 0) {
121
- 

Return to bug 36136