Skip to main content Skip to docs navigation


On this page
For the sake of the following documentation, assume there's a picker setup like this:
const picker = new tempusDominus

updateOptions(object, boolean?)

In previous version there was a function to read/write to each of the provided options. This made it easy to use but made the code bulky and harder to maintain. updateOptions replaces those functions and takes an object of new options. This allows for multiple options to be set at the same time and works the same way as when setting up the picker.

If the optional reset flag is provided then new options will be merged with the default values.


Destroys the widget and removes all attached event listeners. If the picker is open it will be hidden and the event fired.


Disables the input element and the component is attached to, by adding a disabled="true" attribute to it. If the widget was visible before that call it is hidden.


  • - if the widget was visible before this call


Enables the input element and the component is attached to, by removing disabled attribute from it.


Clears all selected dates. This is a short cut to picker.dates.clear()

subscribe(event | events[], callback | callbacks[])

Instead of adding event listeners to the pickers element, you can use the subscribe method. You can provide a single event to listen for or an array of events. When providing an array the number of callbacks must be the same as the number of events.

The subscribe method returns an unsubscribe method or an array of methods if multiple events are provided. Calling unsubscribe remove the callback from the event listeners. Unsubscribing will not prevent addEventListener() from working.

const subscription = picker.subscribe(, (e) => {

// event listener can be unsubscribed to:

//you can also provide multiple events:
const subscriptions = picker.subscribe(
        [(e)=> console.log(e), (e) => console.log(e)]