My goal is to build out completely custom buttons for the prev/next functionality, not just using icon strings like the ones from font-awesome for instance, but with a custom in-house "element", which is basically a component by itself. I'm aware of the customButtons
object specified in the docs, but that doesn't achieve the objective here to add fully custom buttons, since that one is still a "FullCalendar" flavored button with its own background and stuff, plus the customButtons
approach requires passing strings, whereas my custom button will be an element. What I'm trying to achieve is something like the following (I'm using version 5 in case it helps):
const myCustomPrevBtn = {
return <CustomButton onClick={()=>{}}>Prev</CustomButton >
}
const myCustomNextBtn = {
return <CustomButton onClick={()=>{}}>Next</CustomButton >
}
<FullCalendar
headerToolbar={{
left:'myCustomPrevBtn',
right:'myCustomNextBtn'
}}
plugins={[dayGridPlugin, timeGridPlugin]}
initialView="timeGridWeek"
/>
I was thinking about not using FullCalendar's default headerToolbar
at all (since we're talking custom components for the prev/next buttons) by doing headerToolbar={{false}}
, but not sure how I'd let the user move between the previous or next week/day/month if I take that route. Any thoughts on that?