Skip to content

Commit

Permalink
Merge pull request #11 from domicode/features/update-readme
Browse files Browse the repository at this point in the history
feat(readme): update readme with getting started section
  • Loading branch information
chingyawhao committed May 30, 2016
2 parents 212e055 + 996a8af commit c66ea07
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,35 @@ npm i gulp bower -g
npm install
bower install
gulp watch
```
```


## Getting started

### Basic setup

1. Make sure you have materialize css (including their JavaScript files): http://materializecss.com/

2. Install this package via npm or bower. Alternatively you can also download the [source](https://github.com/chingyawhao/materialize-clockpicker/tree/master/src) files and add them to your project manually.

3. Create an input field in your html code like the following:

```
<div class="input-field col s12">
<label for="timepicker">Time</label>
<input id="timepicker" class="timepicker" type="time">
</div>
```

4. Add the Javascript trigger with the corresponding [options](https://github.com/chingyawhao/materialize-clockpicker#options)

```
<script>
$('#timepicker').pickatime({
autoclose: false,
twelvehour: false
});
</script>
```

You can trigger the clock either by ID's or classes (useful if you have several clocks on one page).

0 comments on commit c66ea07

Please sign in to comment.