Articles in this section
Category / Section

How to Disable Event Creation on Cell Click in React Scheduler?

5 mins read

This article explains 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.


[Index.js]
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;
 

export default Default;

Refer to the working sample for additional details and implementation: Qb9j3n (forked) - StackBlitz

 

For more information refer the API documentation,

 cellClick event API documentation and cellDoubleClick event API documentation

 

Conclusion

We 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 forumsBoldDesk Support, or feedback portal. We are always happy to assist you!


Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied