Do not set current moment when opening the picker

Otherwise this trigger a display before the focus out of the previously focused
widget. Such that the previous widget may loose its data.
So we prevent datetimepicker to set a moment and such that it behaves like
tryton.

issue8921
review266581003
This commit is contained in:
Cédric Krier committed 2019-12-28 17:50:36 +01:00
1 parent 1e3b660602
commit 3feb93e4af
1 file changed
+2
+2
View File
@@ -1403,6 +1403,7 @@ function eval_pyson(value){
this.date.datetimepicker({
'locale': moment.locale(),
'keyBinds': null,
'useCurrent': false,
});
this.date.css('max-width', this._width);
this.date.on('dp.change', this.focus_out.bind(this));
@@ -4515,6 +4516,7 @@ function eval_pyson(value){
'format': Sao.common.moment_format(this.format),
'locale': moment.locale(),
'keyBinds': null,
'useCurrent': false,
});
this.date.on('dp.change',
this.parent_widget.focus_out.bind(this.parent_widget));