mirror of
https://github.com/xdan/datetimepicker.git
synced 2024-11-18 06:24:22 +00:00
fix infinite loop
if start is `Invalid Date` then start.getDay() is `Nan`, so code gets stuck on infinite loop.
This commit is contained in:
parent
cda4cbc903
commit
a9c876db7c
@ -1667,7 +1667,7 @@ var datetimepickerFactory = function ($) {
|
||||
clearTimeout(xchangeTimer);
|
||||
xchangeTimer = setTimeout(function () {
|
||||
|
||||
if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
|
||||
if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null || isNaN(_xdsoft_datetime.currentTime.getTime())) {
|
||||
_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user