How can I add a custom header component to react-infinite-calendar? It seems the package doesn't have that kinda support(unsure though).
Is there any way I can insert a button component inside the header?
basic calendar initialization:
How can I add a custom header component to react-infinite-calendar? It seems the package doesn't have that kinda support(unsure though).
Is there any way I can insert a button component inside the header?
basic calendar initialization:
Yes, you can use HeaderComponent prop to pass custom header to react-infinite-calendar. You can use the following code in your codesandbox example.
import "./styles.css";
import InfiniteCalendar from 'react-infinite-calendar'
import 'react-infinite-calendar/styles.css'
export default function App() {
return (
<div className="App">
<InfiniteCalendar
width={400}
height={600}
HeaderComponent={() => <p>123</p>}
/>
</div>
);
}