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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Schedule enddate issue

Thread ID:

Created:

Updated:

Platform:

Replies:

140794 Nov 7,2018 01:54 PM UTC Nov 13,2018 04:11 AM UTC ASP.NET Core - EJ 2 1
loading
Tags: Schedule
Scott Lambert
Asked On November 7, 2018 01:54 PM UTC


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-views>
            <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-views>
        <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>
            </e-eventsettings-fields>
        </e-schedule-eventsettings>
    </ejs-schedule>
</div>
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.

Thanks,

Scott
   
   

Vinitha Devi Murugan [Syncfusion]
Replied On 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.  
 
 
[Index.cshtml]   
 <ejs-schedule id="schedule" height="550px" selectedDate="new DateTime(2018, 10, 1)" > 
        <e-schedule-views> 
            <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-views> 
        <e-schedule-eventsettings > 
            <e-data-manager url="http://localhost:25255/odata/EventDatas" adaptor="ODataV4Adaptor" crossDomain="true"> 
            </e-data-manager> 
 
        </e-schedule-eventsettings> 
 
    </ejs-schedule> 
 
Please get back to us if you need further assistance.  
 
Regards,  
M. Vinitha devi 

  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;