Giter Site home page Giter Site logo

jordymoos / elm-clockpicker Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 1.0 143 KB

A clock-style timepicker in elm

Home Page: https://jordymoos.github.io/elm-clockpicker/

License: BSD 3-Clause "New" or "Revised" License

Elm 73.57% CSS 26.43%
clockpicker timepicker elm elm-clockpicker clock-picker

elm-clockpicker's Introduction

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.

elm-clockpicker's People

Contributors

demontpx avatar jordymoos avatar marcusklaas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

demontpx

elm-clockpicker's Issues

generalize the css

Now we use twitter bootstrap like css names but those should be more generalized and also namespaced.

the main idea is that the client specifies how the clockpicker looks

Refactor code

At least remove the duplication of hour and minute

Add tests

we should add tests for the am pm behavior etc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.