mercurymedia / elm-datetime-picker

Single and duration datetime picker components written in Elm 0.19
https://package.elm-lang.org/packages/mercurymedia/elm-datetime-picker/latest/
MIT License
16 stars 6 forks source link

Imports to Utilities don't work #8

Closed viktorce closed 4 years ago

viktorce commented 4 years ago

These imports don't work for me: import DatePicker.Styles import DatePicker.Utilities import DatePicker.Icons

This is the error message:

17| import DatePicker.Styles
           ^^^^^^^^^^^^^^^^^
I checked the "dependencies" and "source-directories" listed in your elm.json,
but I cannot find it! Maybe it is a typo for one of these names?

And I have the package installed via elm install. This is the line in elm.json: "mercurymedia/elm-datetime-picker": "1.1.0",

viktorce commented 4 years ago

I think they need to be added to exposed modules in elm.json

viktorce commented 4 years ago

I see now that they are not really needed, I just couldn't run the DurationDatePicker example without Utilities import. Maybe that one can be exposed or the example could be changed for an easier experience. If any of this makes sense I could also make a PR, if you give me specific direction.

jmpressman commented 4 years ago

@viktorce thanks for spotting this! Yes, it makes sense to make the example not rely on an additional module that isn't part of the package. Perhaps you could pull the relevant functions from the Utilities module directly into the example. I believe they are mostly for formatting the selected datetime. Or if there is a cleaner way to format the selected datetime than what exists in the Utilities module, feel free to do that. The goal is to keep the example relatively lightweight and focused on the implementation of the picker itself as opposed to having clutter related to formatting, etc.