mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
fix for allowDateRe and allowDates
Replaced start.dateFormat(options.formatDate) with dateHelper.formatDate(start, options.formatDate)
This commit is contained in:
parent
3c30a1c84e
commit
fa82ac3a09
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user