changeset 7a564833413d in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=7a564833413d
description:
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
diffstat:
src/sao.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r ad0f836a7d74 -r 7a564833413d src/sao.js
--- a/src/sao.js Tue Sep 03 13:16:22 2019 +0200
+++ b/src/sao.js Sat Sep 07 23:17:44 2019 +0200
@@ -154,7 +154,8 @@
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));