Display Functions
const picker = new tempusdominus
.TempusDominus(document.getElementById('datetimepicker1'));
toggle
Shows or hides the widget
Emits
-
Namespace.events.hide
- if the widget is hidden after the toggle call -
Namespace.events.show
- if the widget is show after the toggle call -
Namespace.events.change
- if the widget is opened for the first time and the input element is empty andoptions.useCurrent != false
show
Shows the widget
Emits
-
Namespace.events.show
- if the widget was hidden before that call -
Namespace.events.change
- if the widget is opened for the first time and theuseCurrent
is set to true or to a granularity value and the input element the component is attached to has an empty value
paint(Unit | 'decade', DateTime, string[], HTMLElement)
Allows developers to add/remove classes from an element. During the grid generation code, this function is called.
It provides the unit that is being generated (i.e. displaying the main date view), the date time object being effected, the current set of css classes and the container element.
Check out the example paint plugin.