diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/forms/the-input-element/datetime-local-trailing-zeros.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/forms/the-input-element/datetime-local-trailing-zeros.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/forms/the-input-element/datetime-local-trailing-zeros.html b/testing/web-platform/tests/html/semantics/forms/the-input-element/datetime-local-trailing-zeros.html new file mode 100644 index 0000000000..0fb031d510 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/forms/the-input-element/datetime-local-trailing-zeros.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<link rel=author href="mailto:jarhar@chromium.org"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel=help href="https://html.spec.whatwg.org/multipage/multipage/common-microsyntaxes.html#local-dates-and-times"> +<link rel=help href="https://html.spec.whatwg.org/multipage/multipage/states-of-the-type-attribute.html#local-date-and-time-state-(type=datetime-local)"> + +<input id=input type=datetime-local value="2022-04-19T12:34:56.010"> + +<script> +test(() => { + assert_equals(input.value, '2022-04-19T12:34:56.01'); +}, 'Verifies that trailing zeros in the milliseconds portion of the date strings are removed.'); +</script> |