Q:

Is it possible to unselect the current date in jQuery UI datepicker?

I'm using a datepicker, which is always visible on the page, and tied to a hidden <input>.
Depending on the user interactions on the page, some dates can get dynamically disabled (via beforeShowDay).
The problem is, this allows to disable a date which has been previously selected:

To avoid this, I'd like to unselect the current date prior to refreshing the datepicker.
Is this possible?

A:

EDIT: The datepicker is attached to a div. Clear the selected value like this:
$('selector').datepicker('setDate')

This will unselect whatever day is selected.

