4 <script src=
"../../../resources/js-test.js"></script>
5 <script src=
"../../forms/resources/picker-common.js"></script>
6 <script src=
"resources/calendar-picker-common.js"></script>
9 <p id=
"description"></p>
10 <div id=
"console"></div>
12 <input type=date id=date
value=
"2011-05-02" step=
"9">
13 <input type=date
id=
"date-bare" step=
"9">
16 description('Test if step limits available dates in calendar picker.');
18 document
.getElementById('date-bare').value
= '2011-05-01';
19 openPicker(document
.getElementById('date-bare'), test1
);
22 debug("Step without value or min attributes.");
23 shouldBeEqualToString('availableDayCells()', '2011-05-08,2011-05-17,2011-05-26,2011-06-04');
26 eventSender
.keyDown('escape');
27 waitUntilClosing(test1AfterClose
);
30 function test1AfterClose() {
31 openPicker(document
.getElementById('date'), test2
);
35 debug("Step without min.");
36 shouldBeEqualToString('availableDayCells()', '2011-05-02,2011-05-11,2011-05-20,2011-05-29');
39 eventSender
.keyDown('escape');
40 waitUntilClosing(test2AfterClose
);
43 function test2AfterClose() {
44 document
.getElementById('date').min
= '2011-05-01';
47 openPicker(document
.getElementById('date'), test3
);
51 debug("Step when min is set.");
52 shouldBeEqualToString('availableDayCells()', '2011-05-01,2011-05-10,2011-05-19,2011-05-28');