![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
ajv-material-pickers-time
Advanced tools
npm install material-pickers-time
Requires the use of the gulp task runner and babel cli. To install globally, use npm install -g gulp babel-cli
gulp
gulp test:js
npm start
gulp && npm run build
Currently, the Material Design Lite project doesn't have any picker features implemented. There are a few other OS material picker libraries but they are either not actively maintained, or require heavy dependencies.
In need of a timepicker for a current project I made this library. Built with vanilla JavaScript and no dependencies. Written in ES6 and SASS.
The library currently supports both 12 and 24 time formats.
To check out live examples and view the test runner check out https://pickers.nickc.io/time.html
Current only one option is implemented to change between 12 and 24 hour time. They are passed when one of the public API methods are called, merged with default options, and set the property mtpOptions
on the input element specified.
{
timeFormat
: standard
or military
by default it will be standard
}
bindInput
Adds an event listener to input element specified. When the input element triggers a focus event the timepicker will open.
inputEl
: either a string selector, or a HTMLElement
options
: (optional) options object to be set to input element object
const timepicker = new TimePicker();
// using a selector with no options
timepicker.bindInput('#selector');
// using a cached element with 24 time format
timepicker.bindInput(cachedEl, {timeFormat: 'military'});
openOnInput
Better suited for use in a framework environment where you want more customized control over the picker. When called it will immediately open with the input element specified in context.
inputEl
: either a string selector, or a HTMLElement
options
: (optional) options object to be set to input element object
const timepicker = new TimePicker();
const standardInput = document.querySelectorAll('#standard-input');
standardInput.on('focus', event => timepicker.openOnInput(event.target));
FAQs
Material design time picker
The npm package ajv-material-pickers-time receives a total of 2 weekly downloads. As such, ajv-material-pickers-time popularity was classified as not popular.
We found that ajv-material-pickers-time demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.