diff --git a/jquery.datetimepicker.js b/jquery.datetimepicker.js index 7cb8e13..0f18ada 100644 --- a/jquery.datetimepicker.js +++ b/jquery.datetimepicker.js @@ -460,6 +460,8 @@ maxDate: false, minTime: false, maxTime: false, + disabledMinTime: false, + disabledMaxTime: false, allowTimes: [], opened: false, @@ -1568,6 +1570,9 @@ if ((options.minDateTime !== false && options.minDateTime > optionDateTime) || (options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) { classes.push('xdsoft_disabled'); } + if ((options.minDateTime !== false && options.minDateTime > optionDateTime) || ((options.disabledMinTime !== false && now.getTime() > _xdsoft_datetime.strtotime(options.disabledMinTime).getTime()) && (options.disabledMaxTime !== false && now.getTime() < _xdsoft_datetime.strtotime(options.disabledMaxTime).getTime()))) { + classes.push('xdsoft_disabled'); + } current_time = new Date(_xdsoft_datetime.currentTime); current_time.setHours(parseInt(_xdsoft_datetime.currentTime.getHours(), 10));