Hello Gurus,
When I click on cell, I don't want popup to open, instead I would like to save the event for 1 hr
Hi Manasee,
You can achieve your
requirement by using the schedule's cellClick
event and addEvent
method. However, when the event start time and end time are obtained from
clicked cells, you need to set a default subject for the event. The attached
code snippet and sample below demonstrate the solution. Let us know if you need
any further assistance.
Sample: https://stackblitz.com/edit/schedule-oncell-click-utztfl?file=index.js,datasource.json
|
const Views = () => { const scheduleObj = useRef(null); const data = extend([], dataSource.zooEventsData, null, true); let count = 0; const [currentView, setCurrentView] = useState("Week"); const onEventRendered = (args) => { applyCategoryColor(args, scheduleObj.current?.currentView); };
const onCellClick = (args) => { args.cancel = true; count = count + 1 let eventData = { Subject: "event-" + count, StartTime: args.startTime, EndTime: args.endTime, IsAllDay: args.isAllDay }; scheduleObj.current.addEvent(eventData); } return (<div className='schedule-control-section'> <div className='col-lg-9 control-section'> <div className='control-wrapper'> <ScheduleComponent cellClick={onCellClick} width='100%' height='650px' ref={scheduleObj} selectedDate={new Date(2021, 1, 15)} eventSettings={{ dataSource: data }} eventRendered={onEventRendered} currentView={currentView}>
|
Regards,
Ashok
Thanks Ashok for the quick reply.
I was able to get it working however I noticed few things that is not working on my side and also wanted to know how can I accomplish
Not working:
1) When I reseize, the event selection disappeared.
2) How do I get conferenceId --> Is that the groupIndex ?
Would like to do
1) When I click on the event, I would like to disable the edit option, I only want delete and cancel button
2) I would like the data coming from database OR in the case datasource.json to be readonly.
3) In the attachment, I see a CSS issue on the right side of the event, there is a gap, how can I fix that ( attached )
4) Is there an example to load datasource.json from the DB ?
Hi Manasee Punjani,
We have created a separate forum for this query. Please follow the below forum for further details.
https://www.syncfusion.com/forums/187124/when-i-reseize-the-event-selection-disappeared-from-187056
Regards,
Ashok