How to Disable Event Creation on Cell Click in React Scheduler?
In the Syncfusion React Scheduler, the default behavior when clicking on a cell is to open a quick info popup for event creation. Similarly, double-clicking on a cell opens the schedule Editor Window for event creation. If you want to disable these behaviors, you can do so by binding the scheduler's cellClick and cellDoubleClick events and setting args.cancel to true.
const Default = () => {
const scheduleObj = useRef(null);
const onCellClick = (args) => {
args.cancel = true;
};
const onCellDoubleClick = (args) => {
args.cancel = true;
};
return (<div className='schedule-control-section'>
<div className='col-lg-9 control-section'>
<div className='control-wrapper'>
<ScheduleComponent height='650px' ref={scheduleObj} selectedDate={scheduleData} eventSettings={{ dataSource: data }}
cellClick={onCellClick} cellDoubleClick={onCellDoubleClick}>
</ScheduleComponent>
</div>
</div>
</div>);
};
export default Default;
Conclusion
I hope you enjoyed learning on how to disable event creation on cell click in React Scheduler.
You can refer to our React Scheduler feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our React Scheduler Example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!