πRange Picker
useCalendar
supports a date range mode, all you need to do is to call the hook with the isRangePicker
option set to true
, mind that in date range mode, the range value is stored in a different variable - rangeValue
const { rangeValue } = useCalendar({
isRangePicker: true,
});
console.log(JSON.strigify(rangeValue));
// {"startDate":"2024-12-09T22:00:00.000Z","endDate":"2024-12-17T22:00:00.000Z"}
Last updated