Pinku

Pinku

  • NA
  • 227
  • 38.8k

Calender jumps to the current date while selecting multiple

Dec 27 2019 12:45 AM
I have a big problem with the multiple date picker. Wheneaver I enter a date (for instance in August) the date picker automatically jumps back to the current date. So I have to go to August again manually which is very annoying if you have to add dozens of dates.
 
jQuery("#txtDate").multiDatesPicker({
dateFormat: 'dd/mm/yy',
showOn: 'focus',
minDate: +1,
multidate: true,
maxDate: ScriptVariables.Get('ExpiryDate'),
maxPicks: ScriptVariables.Get('MaxDatePicks'),
showOn: "button",
buttonImage: "http://img.icbdr.com/images/images/jpimages/mdp-icon.png",
buttonImageOnly: true,
buttonText: "You can use this feature to schedule the refreshes for this job."
});
var SelectedDates = ScriptVariables.Get('SelectedDates');
if(jQuery('#rMultiOpt').is(':checked'))
{
jQuery("#txtDate").multiDatesPicker('addDates', GetSelectedDates(SelectedDates)
);
jQuery("#txtDate").val(SelectedDates);
}
 
function GetSelectedDates(dates)
{
var myDates = [];
jQuery.each(dates.split(','), function(){
myDates.push(jQuery.trim(this));
});
return myDates
}
 

Answers (1)