Lines 35-41
Link Here
|
35 |
flatpickr.l10ns.default.months = flatpickr_months; |
35 |
flatpickr.l10ns.default.months = flatpickr_months; |
36 |
flatpickr.setDefaults({ |
36 |
flatpickr.setDefaults({ |
37 |
allowInput: true, |
37 |
allowInput: true, |
38 |
dateFormat: flatpickr_dateformat_string, |
38 |
dateFormat: "Y-m-d", |
|
|
39 |
altInput: true, |
40 |
altFormat: flatpickr_dateformat_string, |
41 |
altInputClass: 'flatpickr-input', |
39 |
nextArrow: '<i class="fa fa-fw fa-arrow-right"></i>', |
42 |
nextArrow: '<i class="fa fa-fw fa-arrow-right"></i>', |
40 |
prevArrow: '<i class="fa fa-fw fa-arrow-left"></i>', |
43 |
prevArrow: '<i class="fa fa-fw fa-arrow-left"></i>', |
41 |
time_24hr: flatpickr_timeformat, |
44 |
time_24hr: flatpickr_timeformat, |
Lines 46-52
Link Here
|
46 |
}, |
49 |
}, |
47 |
onReady: function( selectedDates, dateStr, instance ){ |
50 |
onReady: function( selectedDates, dateStr, instance ){ |
48 |
/* When flatpickr instance is created, automatically append a "clear date" link */ |
51 |
/* When flatpickr instance is created, automatically append a "clear date" link */ |
49 |
$(instance.input) |
52 |
$(instance.input).siblings('input.flatpickr') |
50 |
/* Add a wrapper element so that we can prevent the clear button from wrapping */ |
53 |
/* Add a wrapper element so that we can prevent the clear button from wrapping */ |
51 |
.wrap("<span class='flatpickr_wrapper'></span>") |
54 |
.wrap("<span class='flatpickr_wrapper'></span>") |
52 |
.attr("autocomplete", "off") |
55 |
.attr("autocomplete", "off") |