We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Schedule enddate issue

The issue I am having is that the Schedule control create event.

First the create event short form i.e. not expanded, always returns an enddate 24 hours after the start date, I understand that using the non-expanded dialog creates an all day event, I am good with that but it sends an startdate on the correct day, but the enddate is always on the next day. Even the expanded dialog will do the same unless the user expressly set a enddate with a time.

My 'fix' is that on the server side if the date is tagged as an allday event I set the enddate = startdate. But if I do this my users will not be able to set an all day event that spans multiple days. I have tried setting default tag on the field, but that doesn't appear to work. 

My razor code is:

<div class="schedule-wrapper">
    <ejs-schedule id="schedule" width="100%" height="550" currentView="Month">
            <e-schedule-view option="Day"></e-schedule-view>
            <e-schedule-view option="Week"></e-schedule-view>
            <e-schedule-view option="WorkWeek"></e-schedule-view>
            <e-schedule-view option="Month"></e-schedule-view>
        <e-schedule-eventsettings dataSource="dataManager">
            <e-eventsettings-fields id="EventId">
            <e-field-subject name="Subject"></e-field-subject>
            <e-field-location name="Location"></e-field-location>
            <e-field-description name="Description"></e-field-description>
            <e-field-isallday name="IsAllDay"></e-field-isallday>
            <e-field-starttime name="StartTime"></e-field-starttime>
            <e-field-endtime name="EndTime"></e-field-endtime>
Is there an event that is fired before the create event dialog is displayed where I can set appropriate defaults.  As an aside, the documentation and examples seem to be very sparse. I would like an example that shows an full odatav4 remote data access with crud. If there is one I haven't been able to find it.



1 Reply

VD Vinitha Devi Murugan Syncfusion Team November 13, 2018 04:11 AM UTC

Hi Scott, 
By default when Allday checkbox is checked the endTime  will be the startTime of the next day which is the default behavior.  ‘popupOpen’  is a client-side event which triggers before any of the popups getting opened on the schedule here you can set any default values needed. Please refer below UG link: 

We have prepared a sample to perform CRUD operation with ODataV4Adaptor. For that, we have created an ODataV4 service project for server side and ASP.NET Core project for client side. Please download the sample from the below link, 
Note : Run the OData Service application first, then run the asp.net core sample to render the Schedule and perform CRUD.  
 <ejs-schedule id="schedule" height="550px" selectedDate="new DateTime(2018, 10, 1)" > 
            <e-schedule-view option="Day"></e-schedule-view> 
            <e-schedule-view option="Week"></e-schedule-view> 
            <e-schedule-view option="WorkWeek"></e-schedule-view> 
            <e-schedule-view option="Month"></e-schedule-view> 
            <e-schedule-view option="Agenda"></e-schedule-view> 
        <e-schedule-eventsettings > 
            <e-data-manager url="http://localhost:25255/odata/EventDatas" adaptor="ODataV4Adaptor" crossDomain="true"> 
Please get back to us if you need further assistance.  
M. Vinitha devi 


Live Chat Icon For mobile
Up arrow icon