Selecting more than one day on the popup calendar and the shown month is changed to the current
Using the demo page: http://multidatespickr.sourceforge.net At the From input demo select a day in December, then the popup closes and open again, select another day in December, again the popup closes and open again, but now the month presented is october(the actual current month).
I'm trying to debug, if I found a solution I'll post here.
Anyone else with this problem?
Thanks!
I found the problem: When the datepicker will get the date from field, first time is only one date, that it can parse, but when are two dates, it can't parse the string "xx/xx/xxxx, xx/xx/xxxx".
So I created a workaround, probably its not the best, because I'm not familiar with jQuery's inheritance, this is the way I made it to work.
The changes are on jquery.ui.picker.js:
- on _selectDate method (Line 920): -- add before "if(inst.inline)" the following:
this._lastAdded = dateStr;
- on _setDateFromField method. (Line 1291): -- add before "var date, defaultDate;" the following:
if(this._lastAdded != undefined)
dates = this._lastAdded;
I'm experiencing problems with this as well. Is this a bug in MDP or in the jQueryUI datepicker?