How to fill in datetime-local inputs #749
nTraum
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just in case someone else is stumbling upon this and biting their nails:
When attempting to fill in a datetime into a
datetime-local
input field the expected string format is not obvious.At least with Chrome/Chromedriver, the datetime must not be formatted in ISO8601 or alike, but instead as if one would fill the
input
manually by keyboard, so:So
~N[2023-01-01T12:00:00]
becomes:0 1 0 1 2 0 2 3 TAB 1 2 0 0 P M
Notice the TAB to switch from the date part to the time part in the input.
With a small helper function this can become a bit more elegant:
And then use it in the test:
Beta Was this translation helpful? Give feedback.
All reactions