зеркало из https://github.com/mozilla/pjs.git
Checked in patch for bug 245169
This commit is contained in:
Родитель
27861ad942
Коммит
a127f1a2e9
|
@ -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>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче