I'm trying to prevent the click event on each day from DateRangePicker , I'm just trying to prevent users from changing the period.
I've created a pen in Codepen, follow link: link
HTML
<input data-start="16/11/2018" data-end="16/12/2018" type="text" name="dates">
Javascript
const self = $('input[name="dates"]')
self.daterangepicker({
applyButtonClasses: 'd-none',
showDropdowns: false,
opens: "center",
drops: "down",
autoApply: false,
startDate: self.data('start'),
endDate: self.data('end'),
minDate: self.data('start'),
maxDate: self.data('end'),
locale: {
format: "DD/MM/YYYY",
separator: " - ",
firstDay: 1
}
});
I've already tried to add the " disabled " attribute in input
, but this only prevents the click event on input
, so DateRangePicker does not even appear.
I just want to show the period in a 'read-only' mode.