Search code examples
javascriptpikaday

Is there a way to deselect date in Pikaday?


Is there a way to deselect selected by user day in Pikaday calendar?

I would like to get from this state

enter image description here

to the following one

enter image description here


Solution

  • You could set the pickers date to null using .setDate(null) and attaching a listener to a button you press as described in the documentation to clear the selected date.