/elm-clockpicker

A clock-style timepicker in elm

Primary LanguageElmBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

elm-clockpicker

elm package install JordyMoos/elm-clockpicker

A reusable clock picker component in Elm.

Examples

See the examples folder and the ClockPicker demo.

Run examples

  • Run npm install in the root directory
  • Goto examples/ and run make there
  • Open examples/simple/index.html in your browser

Settings

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://package.elm-lang.org/packages/JordyMoos/elm-clockpicker/latest/ClockPicker#settings

CSS

The CSS for the clock picker is distributed separately. You can grab the compiled CSS from here.

Additional copyright notices

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.