Bug 1320225: [DateTimeInput] Integration of input type=date input box with picker (part 2)

This commit is contained in:
janekptacijarabaci 2018-02-14 14:45:58 +01:00 committed by Roy Tam
commit 753a28d239
4 changed files with 21 additions and 6 deletions

View file

@ -199,10 +199,24 @@
</method>
<method name="setFieldsFromPicker">
<parameter name="aValue"/>
<body>
<![CDATA[
// TODO: Bug 1320225 - [DateTimeInput] Integration of input type=date
// input box with picker.
let year = aValue.year;
let month = aValue.month;
let day = aValue.day;
if (!this.isEmpty(year)) {
this.setFieldValue(this.mYearField, year);
}
if (!this.isEmpty(month)) {
this.setFieldValue(this.mMonthField, month);
}
if (!this.isEmpty(day)) {
this.setFieldValue(this.mDayField, day);
}
]]>
</body>
</method>