I have a Schedule Component from @syncfusion/ej2-react-schedule
Now when I double click and get the pop up window with the editable table the All day box is ticked by default. How can I change so that it is not?
I played around with the fields attribute in eventStettings but it do not seem to work
Here is my code so far
<ScheduleComponent
height='600px'
currentView='Month'
eventSettings={
{
fields: {
subject: { title: 'Work', name: 'Subject', default: 'Type of work' },
description: { title: 'Comment', name: 'Description' },
startTime: { title: 'From', name: 'StartTime' },
endTime: { title: 'To', name: 'EndTime' },
// HERE IS WHERE I THOUGHT I BE ABLE TO CHANGE THE DEFAULT OF THE BOX BEING TICKED IN OR NOT
isAllDay: { name: 'isAllDay', default: false, title: 'All Day', validation: {} }
}
}
}
>
<ViewsDirective>
<ViewDirective option='Day' startHour='05:00' endHour='22:00'></ViewDirective>
<ViewDirective option='Week' />
<ViewDirective option='Month' />
</ViewsDirective>
<Inject
services={[Month, Week, Resize, Day, DragAndDrop,]}
/>
</ScheduleComponent>
2
Answers
I finally found the answer with the spannedEventPlacement set to'TimeSlot', And also founf out its not available in the month view, so it didnt really help me, but at least I stopped looking.
In the month view, the popup opened for the entire day by default, hence the allday check option was initially selected. You can uncheck this by using the popupOpen event, as shown in the below shared snippet.
Sample: https://stackblitz.com/edit/react-hxxapj?file=index.js
Api: https://ej2.syncfusion.com/react/documentation/api/schedule/#popupopen
[index.js]