Skip to content
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

Integration with elm/time #196

Open
aecay opened this issue Jun 25, 2019 · 0 comments
Open

Integration with elm/time #196

aecay opened this issue Jun 25, 2019 · 0 comments

Comments

@aecay
Copy link

aecay commented Jun 25, 2019

Since elm/time is now the recommended core library for representing time values, it would be nice for the ecosystem if this library integrated with it. The places I can see where integration would be possible are:

  • make Html.Attributes.datetime accept a Posix
  • let the value of inputs where type is "time" or "date" be a Posix (probably this requires a new function H.A.timeValue. Also make the value passed to the onInput event of those elements be a Posix.

As a stopgap (not requiring any breaking API changes), it would be nice to have functions posixToDom(Date|Time), domDateToPosix, and domTimeToMillis that would convert between the strings that the DOM natively uses and useful elm values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant