Add one day to minimal date to allow reset time
Setting time to zero make the date goes backward and outside the supported range by JavaScript. issue8614 review277781002
This commit is contained in:
+2
-1
@@ -154,7 +154,8 @@ var Sao = {};
|
||||
return date;
|
||||
};
|
||||
|
||||
Sao.Date.min = moment(new Date(-100000000 * 86400000));
|
||||
// Add 1 day to the limit because setting time make it out of the range
|
||||
Sao.Date.min = moment(new Date((-100000000 + 1) * 86400000));
|
||||
Sao.Date.min.set({hour: 0, minute: 0, second: 0, millisecond: 0});
|
||||
Sao.Date.min.isDate = true;
|
||||
Sao.Date.max = moment(new Date(100000000 * 86400000));
|
||||
|
||||
Reference in New Issue
Block a user