The Calendar enables you to set the behavior of its dates.
You can apply either of the following approaches:
The Calendar always displays a focused date and, by default, the focused date is today's date. To change the focused date, use the
focusedDate property by setting it to a specific
Date value. The
By default, the selected date is not set and the Calendar displays only the focused date. To define the selected date, use the
The Calendar accepts the following values that you can set as selected:
Date object as a value.
Date objects as a value. In such scenario we need to se the
mode prop to 'multiple'.
To set a range of dates as selected, pass an object with
end keys which represent the selected range. In such scenario we need to se the
mode prop to 'range'.