ui-dtpicker
Datepicker web UI component
Installation
$ npm install ui-dtpicker --save-dev
Usage
const Datepicker = ;const options = // Set up options here (see below); const someDatepicker = options;someContainerElement;someDatepicker;
Options
Type: {Object}
tabindex
Type: {Integer}
The value of tabindex
attribute to be set for the DOM element of the first button. Default: 1
.
initialValue
Type: {Date}
Sets up the initial value of the element.
onValueChange
Type: {Function | Array<Function>}
Callback function(s) that will be called every time the value of the element changes.
When called, the function will be passed the following arguments:
{Date} val
- New value of the element.
API
Properties
element
Type: {HTMLElement}
Returns reference to the DOM node created by the constructor.
lastTabindex
Type: {Integer}
Returns the last tabindex value used by the component.
Methods
setValue(val)
Sets the element's value.
Parameters:
{Date} valueData
- The new component value.
Return: {undefined}
getValue()
Gets the current value of the component.
Return: {Date}