Add clear selection button to DaySelector
This commit is contained in:
parent
9a5523d94b
commit
0d6ed2accb
@ -70,6 +70,10 @@ export default function DaySelector() {
|
||||
setEventsList(updatedEvents);
|
||||
};
|
||||
|
||||
const handleClear = () => {
|
||||
setEventsList([])
|
||||
}
|
||||
|
||||
return (
|
||||
<FullCalendar
|
||||
initialView='dayGridMonth'
|
||||
@ -79,6 +83,8 @@ export default function DaySelector() {
|
||||
select={(info) => handleSelect(info)}
|
||||
defaultAllDay={true}
|
||||
events={eventsList}
|
||||
customButtons={{resetSelection:{text: 'clear selection', click: handleClear}}}
|
||||
headerToolbar={{right: 'resetSelection today prev,next'}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user