After change month only two dates are selectable
I noticed behaviour in MDP, that seems to be unwanted:
-
When I change from the current month to another month in future or past, only two dates from that month are selectable
-
After clicking the second date, MDP returns to the current month.
I noticed this behaviour on the MDP demo site and in Fiddles posted by several forum users.
The behaviour is different when pickMaximumRange or maxPicks is enabled and has a value.
My settings for MDP are:
$("#cur").multiDatesPicker({
changeMonth: true,
changeYear: true,
yearRange:"2018:2035",
dateFormat: "dd-mm-yy"
});
+1
I fount a solution $('#from-input').multiDatesPicker(); $.datepicker._selectDateOverload = $.datepicker._selectDate; $.datepicker._selectDate = function (id, dateStr) { var target = $(id); var inst = this._getInst(target[0]); inst.inline = true; $.datepicker._selectDateOverload(id, dateStr); inst.inline = false; if (target[0].multiDatesPicker != null) { target[0].multiDatesPicker.changed = false; } else { target.multiDatesPicker.changed = false; } this._updateDatepicker(inst); }; refer https://github.com/dubrox/Multiple-Dates-Picker-for-jQuery-UI/issues/179
Duplicate of https://github.com/dubrox/Multiple-Dates-Picker-for-jQuery-UI/issues/179 and https://github.com/dubrox/Multiple-Dates-Picker-for-jQuery-UI/issues/188