This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 7b2dc2ea7846965bcb4c79af2fc0466819fac1d7 Author: Kevin Morin <morin@codelutin.com> Date: Tue Aug 3 13:21:48 2021 +0200 rfs #363 Les champs «add hour to date» sont effacés lors de la modification d'un sondage --- pollen-ui-riot-js/package.json | 4 ++-- .../src/main/web/tag/components/time-picker.tag.html | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pollen-ui-riot-js/package.json b/pollen-ui-riot-js/package.json index acb94f5d..ed5f2455 100644 --- a/pollen-ui-riot-js/package.json +++ b/pollen-ui-riot-js/package.json @@ -49,8 +49,8 @@ "console.history": "^1.5.0", "font-awesome": "4.7.0", "html2canvas": "^0.5.0-beta4", - "moment": "^2.24.0", - "moment-timezone": "^0.5.27", + "moment": "^2.29.1", + "moment-timezone": "^0.5.33", "nprogress": "^0.2.0", "object.values": "^1.0.4", "qrcode-generator": "^1.4.1", diff --git a/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html b/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html index 2bc14e2a..60b27203 100644 --- a/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html +++ b/pollen-ui-riot-js/src/main/web/tag/components/time-picker.tag.html @@ -23,7 +23,7 @@ <input if="{session.timeInputSupported}" type="time" class="calendar-field {opts.inputclass}" - value="{opts.time.time ? opts.time.time.format('LT') : undefined}" + value="{opts.time.time ? opts.time.time.format('HH:mm') : undefined}" placeholder="{_t.timeplaceholder}" disabled={opts.disabled} required={opts.required} @@ -57,12 +57,16 @@ this.session = session; this.moment = moment; + console.log("init", this.session.locale) this.moment.locale(this.session.locale); + console.log("locale", this.moment.locale()) this.installBundle(this.session, "time-picker", locale => { + console.log("installBundle", locale, this.opts.time.time) if (this.opts.time.time) { this.opts.time.time.locale(locale); } + console.log("installBundle2", locale, this.opts.time.time) this.moment.locale(locale); }); @@ -108,6 +112,7 @@ this.minuteChanged = () => { this.initTime(); let minute = parseInt(this.refs.minuteInput.value, 10); + console.log("minuteChanged", minute); if (!isNaN(minute)) { this.opts.time.time.minutes(minute); if (this.opts.onchange) { @@ -117,8 +122,10 @@ }; this.onTimeChange = e => { + console.log('onTimeChange', e.currentTarget.value, this.opts.onchange); if (e.currentTarget.value) { - var time = this.moment(e.currentTarget.value, "HH:mm"); + var time = this.moment(e.currentTarget.value, "h:mm"); + console.log(time,time.hours(), time.minutes()) this.initTime(); this.opts.time.time.set({hour: time.hours(), minute: time.minutes()}); } @@ -128,6 +135,7 @@ }; this.initTime = () => { + console.log("initTime", this.opts.time.time) if (!this.opts.time.time) { this.opts.time.time = this.moment(); } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.