elm package install JordyMoos/elm-clockpicker
A reusable clock picker component in Elm.
See the examples folder and the ClockPicker demo.
- Run
npm install
in the root directory - Goto
examples/
and runmake
there - Open
examples/simple/index.html
in your browser
type alias Settings =
{ hourStep : Int
, minuteStep : Int
, startTime : StartTime
, autoClose : Bool
, twelveHour : Bool
, doneText : String
}
import ClockPicker exposing (defaultSettings, StartTime(..))
ClockPicker.init { defaultSettings | minuteStep = 5 }
See [ClockPicker.Settings][settings] for detailed information [settings]: http:https://package.elm-lang.org/packages/JordyMoos/elm-clockpicker/latest/ClockPicker#settings
The CSS for the clock picker is distributed separately. You can grab the compiled CSS from here.
Elm ClockPicker is based on the javascript clockpicker from weareoutman. The css and some of the code is translated from his repository.
The structure of this project is inspired by Bogdanp' elm datepicker. The simple example is also inspired from his elm datepicker.