-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Fixed #5363 -- HTML5 datetime-local valid format HTMLFormRenderer #9365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Hi @auvipy! Following your comment on #5363 (comment) I ask if you could do the review! Thank you! |
# The format of an input type="datetime-local" is "yyyy-MM-ddThh:mm" | ||
# followed by optional ":ss" or ":ss.SSS", so remove [milli|micro]seconds | ||
# to avoid browser error. | ||
field.value = "".join(field.value.rstrip('Z').split(".")[:1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The millisecond part should be retained, as it's a valid part of the format.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please address the review comment
Thanks @auvipy! I'll do it! |
Description
Hi!
This PR deletes the [milli|micro]seconds part of a
DateTimeField
input atHTMLFormRenderer
to avoid break in browsers:refs #5363