blob: 6f5f2c67fbe92fae4102999bc91e47755dbd5efd [file] [log] [blame]
Sub-fields in input[type=month] should be read-only in some cases. This requires window.internals.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
createMonthInput argument order: min, max, value
Year field:
PASS isReadOnlyField(createMonthInput("", "", ""), pseudoYear) is false
PASS isReadOnlyField(createMonthInput("2012-12", "", ""), pseudoYear) is false
PASS isReadOnlyField(createMonthInput("", "2012-12", ""), pseudoYear) is false
PASS isReadOnlyField(createMonthInput("", "", "2012-12"), pseudoYear) is false
PASS isReadOnlyField(createMonthInput("2012-01", "2012-12", ""), pseudoYear) is true
PASS isReadOnlyField(createMonthInput("2012-01", "2013-12", ""), pseudoYear) is false
PASS isReadOnlyField(createMonthInput("2012-01", "2012-12", "2012-05"), pseudoYear) is true
PASS isReadOnlyField(createMonthInput("2012-01", "2012-12", "2013-01"), pseudoYear) is false
Month field:
We should not make all the fields readonly by min/max, so day field is always editable.
PASS isReadOnlyField(createMonthInput("", "", ""), pseudoMonth) is false
PASS isReadOnlyField(createMonthInput("2012-12", "", ""), pseudoMonth) is false
PASS isReadOnlyField(createMonthInput("", "2012-12", ""), pseudoMonth) is false
PASS isReadOnlyField(createMonthInput("", "", "2012-12"), pseudoMonth) is false
PASS isReadOnlyField(createMonthInput("2012-12", "2012-12", ""), pseudoMonth) is false
PASS isReadOnlyField(createMonthInput("2012-11", "2013-12", ""), pseudoMonth) is false
PASS isReadOnlyField(createMonthInput("2012-12", "2013-12", ""), pseudoMonth) is false
PASS isReadOnlyField(createMonthInput("2012-12", "2012-12", "2012-12"), pseudoMonth) is false
PASS isReadOnlyField(createMonthInput("2012-12", "2012-12", "2012-11"), pseudoMonth) is false
PASS successfullyParsed is true
TEST COMPLETE