Checked in patch for bug 245169

This commit is contained in:
mostafah%oeone.com 2004-05-31 16:44:15 +00:00
Родитель 27861ad942
Коммит a127f1a2e9
1 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -148,11 +148,17 @@
<!-- Date was changed by gui: update value. --> <!-- Date was changed by gui: update value. -->
<method name="onDatePick"> <method name="onDatePick">
<body><![CDATA[ <body><![CDATA[
var dateTime = new Date(this.mValue); var oldTime = new Date(this.mValue);
var newDate = this.kDatePicker.value; var newDate = new Date(this.kDatePicker.value);
dateTime.setFullYear(newDate.getFullYear()); // Note: create new date because setting month and date of month in
dateTime.setMonth(newDate.getMonth()); // either order can lead to unexpected results (month may be advanced
dateTime.setDate(newDate.getDate()); // automatically if day of month is temporarily out of range).
var dateTime = new Date(newDate.getFullYear(),
newDate.getMonth(),
newDate.getDate(),
oldTime.getHours(),
oldTime.getMinutes(),
oldTime.getSeconds());
this.update(dateTime, true); this.update(dateTime, true);
]]></body> ]]></body>
</method> </method>