Fix the DateTime form control, to actually update the time when changed

in the text box.
This commit is contained in:
Colin Kuskie 2009-09-01 20:13:47 +00:00
parent a0d2e982bc
commit 13c588ff7f
2 changed files with 6 additions and 9 deletions

View file

@ -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

View file

@ -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();