materialize-clockpicker

WebJar for materialize-clockpicker

Лицензия

Лицензия

MIT
Категории

Категории

Github Инструменты разработки Контроль версий
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

github-com-chingyawhao-materialize-clockpicker-
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

materialize-clockpicker
WebJar for materialize-clockpicker
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/chingyawhao/materialize-clockpicker/

Скачать github-com-chingyawhao-materialize-clockpicker-

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-chingyawhao-materialize-clockpicker-/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-chingyawhao-materialize-clockpicker-</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-chingyawhao-materialize-clockpicker-/
implementation 'org.webjars.npm:github-com-chingyawhao-materialize-clockpicker-:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-chingyawhao-materialize-clockpicker-/
implementation ("org.webjars.npm:github-com-chingyawhao-materialize-clockpicker-:1.0.1")
'org.webjars.npm:github-com-chingyawhao-materialize-clockpicker-:jar:1.0.1'
<dependency org="org.webjars.npm" name="github-com-chingyawhao-materialize-clockpicker-" rev="1.0.1">
  <artifact name="github-com-chingyawhao-materialize-clockpicker-" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-chingyawhao-materialize-clockpicker-', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "github-com-chingyawhao-materialize-clockpicker-" % "1.0.1"
[org.webjars.npm/github-com-chingyawhao-materialize-clockpicker- "1.0.1"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

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:

<div class="input-field col s12">
    <label for="timepicker">Time</label>
    <input id="timepicker" class="timepicker" type="time">
</div>
  1. Add default value to the input
<div class="input-field col s12">
    <label for="timepicker">Time</label>
    <input id="timepicker" data-default="14:20:00" class="timepicker" type="time">
</div>
  1. Add the Javascript trigger with the corresponding options
<script>
  $('#timepicker').pickatime({
    autoclose: false,
    twelvehour: false,
    default: '14:20:00'
  });
</script>
  1. Get time selected using after done function
<script>
  $('#timepicker').pickatime({
    autoclose: false,
    twelvehour: false,
    afterDone: function(Element, Time) {
      console.log(Element, Time);
    }
  });
</script>

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

Версии библиотеки

Версия
1.0.1