datetime-local-trailing-zeros.html (704B)
1 <!DOCTYPE html> 2 <link rel=author href="mailto:jarhar@chromium.org"> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <link rel=help href="https://html.spec.whatwg.org/multipage/multipage/common-microsyntaxes.html#local-dates-and-times"> 6 <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)"> 7 8 <input id=input type=datetime-local value="2022-04-19T12:34:56.010"> 9 10 <script> 11 test(() => { 12 assert_equals(input.value, '2022-04-19T12:34:56.01'); 13 }, 'Verifies that trailing zeros in the milliseconds portion of the date strings are removed.'); 14 </script>