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:
1 parent
1e3b660602
commit
3feb93e4af
1 file changed
+2
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user