Hi,
We have been using Bryntum Scheduler Pro for a while and are currently implementing Bryntum Calendar. We would like to use our internal component (as we did with Scheduler) to manage the displayed horizon, instead Bryntum Header.
However, we are encountering a problem: the onDateChange and onDateRangeChange functions, which we use to update our component, do not seem to be working.
The example is quite simple. Here is our implementation:
return (
<Container>
<div className="flex-center-between">
<HorizonCalendarViewer
horizon={{ from: moment(horizon.start), to: moment(horizon.end) }}
onPrevClick={() => togglePrevOrNext("prev")}
onNextClick={() => togglePrevOrNext("next")}
currentViewMode={selectedView == "agenda" ? "day" : selectedView}/>
<div className="flex-center">
<MultiButton variant="bordered" size="sm">
<Button onClick={() => handleChangeView("week")} active={selectedView === "week"}>
<span>Week</span>
</Button>
<Button onClick={() => handleChangeView("month")} active={selectedView === "month"}>
<span>Month</span>
</Button>
<Button onClick={() => handleChangeView("agenda")} active={selectedView === "agenda"}>
<span>Agenda</span>
</Button>
</MultiButton>
</div>
</div>
<div className='calendar-container'>
<BryntumCalendar
height={600}
ref={schedulerProRef}
eventStore={eventStore}
resourceStore={resourceStore}
mode={selectedView}
onDateChange={({ date, source, oldDate }) => {
//No logs here
console.log("onDateChange", date, source, oldDate);
}}
onDateRangeChange={({ old, source, new: { startDate, endDate } }) => {
//No logs here
console.log("onDateRangeChange", old, { startDate, endDate }, source);
}}
/>
</div>
</Container>
)
We are unable to pass the onDateRangeChange stage as Scheduler Pro, so we cannot use our internal component at this stage.
Are there other handlers that I haven't seen in the documentation? Is this normal ?
Thank you very much for your help,