Lines 61-69
Link Here
|
61 |
}, |
61 |
}, |
62 |
onReady: function( selectedDates, dateStr, instance ){ |
62 |
onReady: function( selectedDates, dateStr, instance ){ |
63 |
/* When flatpickr instance is created, automatically append a "clear date" link */ |
63 |
/* When flatpickr instance is created, automatically append a "clear date" link */ |
|
|
64 |
|
65 |
if( $(instance.input).parent().find('.flatpickr_wrapper_'+instance.input.id).length ){ |
66 |
return; |
67 |
} |
68 |
|
64 |
$(instance.input).find('~input.flatpickr:first') |
69 |
$(instance.input).find('~input.flatpickr:first') |
65 |
/* Add a wrapper element so that we can prevent the clear button from wrapping */ |
70 |
/* Add a wrapper element so that we can prevent the clear button from wrapping */ |
66 |
.wrap("<span class='flatpickr_wrapper'></span>") |
71 |
.wrap("<span class='flatpickr_wrapper_"+instance.input.id+"'></span>") |
67 |
.attr("autocomplete", "off") |
72 |
.attr("autocomplete", "off") |
68 |
.after( $("<a/>") |
73 |
.after( $("<a/>") |
69 |
.attr("href","#") |
74 |
.attr("href","#") |
70 |
- |
|
|