MCPcopy Index your code
hub / github.com/chingyawhao/materialize-clockpicker

github.com/chingyawhao/materialize-clockpicker @v0.1.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.3 ↗ · + Follow
6 symbols 13 edges 2 files 0 documented · 0% updated 8y agov0.1.3 · 2018-04-30★ 14021 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Description:

This is a materialize clockpicker designed as an addition to http://materializecss.com/

Most source codes are taken from https://github.com/weareoutman/clockpicker

Install:

bower

bower install materialize-clockpicker --save

npm

npm i materialize-clockpicker --save

Options:

Here are some options and their defaults:

default: '',            // default time, 'now' or '13:14' e.g.
fromnow: 0,             // set default time to * milliseconds from now
donetext: 'Done',       // done button text
cleartext: 'Clear',     // clear button text
autoclose: false,       // auto close when minute is selected
ampmclickable: false,   // set am/pm button on itself
darktheme: false,       // set to dark theme
twelvehour: true,       // change to 12 hour AM/PM clock from 24 hour
vibrate: true,          // vibrate the device when dragging clock hand
container: '',          // default will append clock next to input
submit:''               // submit in 24 hour format

Screenshots:

Image of Materialize Clock Light Image of Materialize Clock Dark

Developing:

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 files and add them to your project manually.

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

```

  <label for="timepicker">Time</label>
  <input id="timepicker" class="timepicker" type="time">

```

  1. Add default value to the input

```

  <label for="timepicker">Time</label>
  <input id="timepicker" data-default="14:20:00" class="timepicker" type="time">

```

  1. Add the Javascript trigger with the corresponding options

```

```

  1. Get time selected using after done function

```

```

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

Core symbols most depended-on inside this repo

leadingZero
called by 17
src/js/materialize.clockpicker.js
raiseCallback
called by 8
src/js/materialize.clockpicker.js
createSvgElement
called by 6
src/js/materialize.clockpicker.js
uniqueId
called by 1
src/js/materialize.clockpicker.js
mousedown
called by 1
src/js/materialize.clockpicker.js
ClockPicker
called by 0
src/js/materialize.clockpicker.js

Shape

Function 6

Languages

TypeScript100%

Modules by API surface

src/js/materialize.clockpicker.js6 symbols

For agents

$ claude mcp add materialize-clockpicker \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page