changeset 0fa9aff1b4e0 in sao:5.0
details: https://hg.tryton.org/sao?cmd=changeset;node=0fa9aff1b4e0
description:
        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
        (grafted from 3a2461a328ec15d4e9480fb59f1f7abc384dae3b)
diffstat:

 src/view/form.js |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r 344119f913a3 -r 0fa9aff1b4e0 src/view/form.js
--- a/src/view/form.js  Mon Dec 16 23:58:50 2019 +0100
+++ b/src/view/form.js  Sat Dec 28 17:50:36 2019 +0100
@@ -1488,6 +1488,7 @@
             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));
@@ -4385,6 +4386,7 @@
                 '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));

Reply via email to