|
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 |
- |
|
|