From 13c588ff7f7461ac835a80c1072b307411277b21 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 1 Sep 2009 20:13:47 +0000 Subject: [PATCH] Fix the DateTime form control, to actually update the time when changed in the text box. --- docs/changelog/7.x.x.txt | 1 + .../yui-webgui/build/datepicker/datepicker.js | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 0cc44082c..05dc3b802 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.7.19 + - fixed #10867: EMS: can't set Ticket time - fixed #10855: Bug in submitting data to ITransact - fixed #10868: EMS Schedule screen won't display - fixed #10857: Wrong entry i18n: Asset_TimeTracking.pm diff --git a/www/extras/yui-webgui/build/datepicker/datepicker.js b/www/extras/yui-webgui/build/datepicker/datepicker.js index 747f63893..d9400d181 100644 --- a/www/extras/yui-webgui/build/datepicker/datepicker.js +++ b/www/extras/yui-webgui/build/datepicker/datepicker.js @@ -129,13 +129,9 @@ YAHOO.WebGUI.Form.DatePicker = { if(res = this.inputBox.value.match(/(\d+)-(\d+)-(\d+)(?: (\d+):(\d+):(\d+))?/)) { date = res[1] + '-' + res[2] + '-' + res[3]; if (res[4]) { - if (!this.hour){ - this.hour = (res[4] < 10 ? '0' : '') + (1 * res[4]); - } - if (!this.min){ - this.min = (res[5] < 10 ? '0' : '') + (1 * res[5]); - } - this.sec = (res[6] < 10 ? '0' : '') + (1 * res[6]); + this.hour = (res[4] < 10 ? '0' : '') + (1 * res[4]); + this.min = (res[5] < 10 ? '0' : '') + (1 * res[5]); + this.sec = (res[6] < 10 ? '0' : '') + (1 * res[6]); } } if (!this.hour) @@ -145,9 +141,9 @@ YAHOO.WebGUI.Form.DatePicker = { if (!this.sec) this.sec = '00'; if (this.useTime) { - this.hourEl.value = this.hour; + this.hourEl.value = this.hour; this.minuteEl.value = this.min; - this.secEl.value = this.sec; + this.secEl.value = this.sec; } this.calendar.select(date); var selectedDates = this.calendar.getSelectedDates();