UX: rework date time input range (#9524)

This commit is contained in:
Joffrey JAFFEUX
2020-04-22 22:17:53 +02:00
committed by GitHub
parent 094ddb1c1f
commit 3bbd8b1258
29 changed files with 581 additions and 612 deletions

View File

@ -18,7 +18,7 @@ async function pika(year, month, day) {
function noop() {}
const DEFAULT_DATE = new Date(2019, 0, 29);
const DEFAULT_DATE = moment("2019-01-29");
componentTest("default", {
template: `{{date-input date=date}}`,
@ -44,7 +44,7 @@ componentTest("prevents mutations", {
await click(dateInput());
await pika(2019, 0, 2);
assert.ok(this.date.getTime() === DEFAULT_DATE.getTime());
assert.ok(this.date.isSame(DEFAULT_DATE));
}
});
@ -60,6 +60,6 @@ componentTest("allows mutations through actions", {
await click(dateInput());
await pika(2019, 0, 2);
assert.ok(this.date.getTime() === new Date(2019, 0, 2).getTime());
assert.ok(this.date.isSame(moment("2019-01-02")));
}
});