-
Notifications
You must be signed in to change notification settings - Fork 389
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
Add support for datetime, time and date inputs #2002
Conversation
Uffizzi Preview |
end | ||
|
||
defp parse(html_value, %{type: :date}) do | ||
case Date.from_iso8601(html_value) do |
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.
We can't specify milliseconds in the input, so I think we should make sure we parse into datetime with second precision.
@jannikbecher thanks for the PR, I dropped a couple comments on both PRs on the overall API :) |
@jonatanklosko thank you for the review! I hope I implemented your suggestions correctly :) Can you give me a hint how to test the implemented behavior? |
We have some tests here, though in this case most of the logic is in the hook, so probably not much to LV test. |
Co-authored-by: Jonatan Kłosko <jonatanklosko@gmail.com>
@jannikbecher thank you! I made a few adjustments to make it clear the values are UTC and the user enters in local time zone, it's ready to go :D |
No description provided.