Bug 637234, don't use readonly field for timepicker as they are initialized in this constructor, r=neil

This commit is contained in:
Neil Deakin 2011-06-03 15:38:23 -04:00
Родитель 9d4a84d546
Коммит 3234577c9f
2 изменённых файлов: 10 добавлений и 6 удалений

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

@ -43,6 +43,10 @@ function testtag_timepicker()
tp.value = testtag_gettimestring(thour, tminute, tsecond);
testtag_comparetime(tp, testid + "set value", thour, tminute, tsecond);
var numberOrder = /^(\D*)\s*(\d+)(\D*)(\d+)(\D*)(\d+)\s*(\D*)$/;
var fdt = new Date(2000,0,1,16,7,9).toLocaleFormat("%X");
is(tp.is24HourClock, Number(fdt.match(numberOrder)[2]) > 12, "is24HourClock");
// check that setting the dateValue property works
tp.dateValue = today;
testtag_comparetime(tp, testid + "set dateValue", thour, tminute, tsecond);

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

@ -246,12 +246,12 @@
extends="chrome://global/content/bindings/datetimepicker.xml#datetimepicker-base">
<implementation>
<field name="is24HourClock" readonly="true">false</field>
<field name="hourLeadingZero" readonly="true">false</field>
<field name="minuteLeadingZero" readonly="true">true</field>
<field name="secondLeadingZero" readonly="true">true</field>
<field name="amIndicator" readonly="true">"AM"</field>
<field name="pmIndicator" readonly="true">"PM"</field>
<field name="is24HourClock">false</field>
<field name="hourLeadingZero">false</field>
<field name="minuteLeadingZero">true</field>
<field name="secondLeadingZero">true</field>
<field name="amIndicator">"AM"</field>
<field name="pmIndicator">"PM"</field>
<field name="hourField">null</field>
<field name="minuteField">null</field>