I´m using KendoDateRangePicker for the first time and I notice that the change event fires multiple times (3). Why? Is this a kendo bug?
here is my sample
$("#daterangepicker").kendoDateRangePicker({
format: "dd/MM/yyyy",
change: function () {
var range = this.range();
var rangeStart = convertDate(range.start, "-");
if (range.end) {
var rangeEnd = convertDate(range.end, "-");
} else {
rangeEnd = "";
}
console.log(rangeStart, rangeEnd);
function convertDate(d, separator) {
var dd = d.getDate();
var mm = d.getMonth();
var yyyy = d.getFullYear();
return dd + separator + mm + separator + yyyy;
}
}
});
<div id="daterangepicker" title="daterangepicker"></div>
I believe it's a bug: it goes against the description in the documentation at https://docs.telerik.com/kendo-ui/api/javascript/ui/daterangepicker/events/change :
Ideally, file it at https://github.com/telerik/kendo-ui-core/issues .