Multiple-Dates-Picker-for-jQuery-UI icon indicating copy to clipboard operation
Multiple-Dates-Picker-for-jQuery-UI copied to clipboard

After change month only two dates are selectable

Open ghost opened this issue 7 years ago • 3 comments

I noticed behaviour in MDP, that seems to be unwanted:

  1. When I change from the current month to another month in future or past, only two dates from that month are selectable

  2. 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"

               });

ghost avatar Mar 01 '18 18:03 ghost

+1

Karthikeyan23jan avatar Mar 02 '18 07:03 Karthikeyan23jan

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

Karthikeyan23jan avatar Mar 02 '18 07:03 Karthikeyan23jan

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

R-W-C avatar May 03 '18 09:05 R-W-C