Merge pull request #402 from beise/master

fix for allowDateRe and allowDates
This commit is contained in:
Valeriy 2016-02-27 22:51:26 +05:00
commit 337ad368b9

View File

@ -1695,11 +1695,11 @@
}
if(options.allowDateRe && Object.prototype.toString.call(options.allowDateRe) === "[object RegExp]"){
if(!options.allowDateRe.test(start.dateFormat(options.formatDate))){
if(!options.allowDateRe.test(dateHelper.formatDate(start, options.formatDate))){
classes.push('xdsoft_disabled');
}
} else if(options.allowDates && options.allowDates.length>0){
if(options.allowDates.indexOf(start.dateFormat(options.formatDate)) === -1){
if(options.allowDates.indexOf(dateHelper.formatDate(start, options.formatDate)) === -1){
classes.push('xdsoft_disabled');
}
} else if ((maxDate !== false && start > maxDate) || (minDate !== false && start < minDate) || (customDateSettings && customDateSettings[0] === false)) {