Editing recurrence events shows wrong dates on the scheduler

These are the issues faced while editing the recurring events:

  • The timezone of the scheduler is Asia/Riyadh, I created the recurring events and the display was correct on the scheduler, but when I edit one event of the recurring events, both the edited event as well as the previous event is shown on the scheduler.
  • I am facing another issue, I need all the events of the scheduler to be displayed in a grid.

11 Replies

HB Hareesh Balasubramanian Syncfusion Team February 17, 2020 12:11 PM UTC

Hi Lavita, 

Greetings from Syncfusion Support. 

Q1: We have validated your reported problem and we have prepared a sample and it is working properly at our end. And for further reference kindly refer the below UG link, 

Q2: Based o your requirement, we have prepared a sample using dataBound event and for further reference kindly refer the below snippets, 

    function onDataBound() { 
        var schObj = document.querySelector('.e-schedule').ej2_instances[0]; 
        var gridObj = document.querySelector('.e-grid').ej2_instances[0]; 
        gridObj.dataSource = schObj.eventsData; 
    } 

And for further reference, kindly refer the below index and controller file in the below snippet, 

Code snippet: 
 
Index.cshtml file: 
@using Syncfusion.EJ2 
@{ 
    ViewData["Title"] = "Home Page"; 
<div style="display: flex"> 
    <div> 
        <ejs-schedule id="schedule" width="100%" dataBound="onDataBound" selectedDate="new DateTime(2018, 2, 15)" height="650px"> 
            <e-schedule-eventsettings dataSource="@ViewBag.appointments"></e-schedule-eventsettings> 
        </ejs-schedule> 
    </div> 
    <div> 
        <ejs-grid id="grid"> 
            <e-grid-columns> 
                <e-grid-column field="Id" headerText="Identifiant"></e-grid-column> 
                <e-grid-column field="Subject" headerText="Subject"></e-grid-column> 
                <e-grid-column field="StartTime" headerText="StartTime"></e-grid-column> 
                <e-grid-column field="EndTime" headerText="EndTime"></e-grid-column> 
            </e-grid-columns> 
        </ejs-grid> 
    </div> 
</div> 


<script> 
    function onDataBound() { 
        var schObj = document.querySelector('.e-schedule').ej2_instances[0]; 
        var gridObj = document.querySelector('.e-grid').ej2_instances[0]; 
        gridObj.dataSource = schObj.eventsData; 
    } 
</script> 

HomeController.cs file: 
using System; 
using System.Collections.Generic; 
using System.Diagnostics; 
using System.Linq; 
using System.Threading.Tasks; 
using Microsoft.AspNetCore.Mvc; 
using EJ2ScheduleSample.Models; 
using EJ2ScheduleSample.Data; 
using Newtonsoft.Json; 

namespace EJ2ScheduleSample.Controllers 
    public class HomeController : Controller 
    { 
        private ScheduleDataContext _context; 
        public IActionResult Index() 
        { 

            ViewBag.appointments = GetScheduleData(); 
            return View(); 
        } 
        public class AppointmentData 
        { 
            public int Id { get; set; } 
            public string Subject { get; set; } 
            public DateTime StartTime { get; set; } 
            public DateTime EndTime { get; set; } 
        } 
        public List<AppointmentData> GetScheduleData() 
        { 
            List<AppointmentData> appData = new List<AppointmentData>(); 
            appData.Add(new AppointmentData 
            { 
                Id = 1, 
                Subject = "Explosion of Betelgeuse Star", 
                StartTime = new DateTime(2018, 2, 11, 9, 30, 0), 
                EndTime = new DateTime(2018, 2, 11, 11, 0, 0) 
            }); 
            appData.Add(new AppointmentData 
            { 
                Id = 2, 
                Subject = "Thule Air Crash Report", 
                StartTime = new DateTime(2018, 2, 12, 12, 0, 0), 
                EndTime = new DateTime(2018, 2, 12, 14, 0, 0) 
            }); 
            appData.Add(new AppointmentData 
            { 
                Id = 3, 
                Subject = "Blue Moon Eclipse", 
                StartTime = new DateTime(2018, 2, 13, 9, 30, 0), 
                EndTime = new DateTime(2018, 2, 13, 11, 0, 0) 
            }); 
            appData.Add(new AppointmentData 
            { 
                Id = 4, 
                Subject = "Meteor Showers in 2018", 
                StartTime = new DateTime(2018, 2, 14, 13, 0, 0), 
                EndTime = new DateTime(2018, 2, 14, 14, 30, 0) 
            }); 
            appData.Add(new AppointmentData 
            { 
                Id = 5, 
                Subject = "Milky Way as Melting pot", 
                StartTime = new DateTime(2018, 2, 15, 12, 0, 0), 
                EndTime = new DateTime(2018, 2, 15, 14, 0, 0) 
            }); 
            return appData; 
        } 

        public IActionResult About() 
        { 
            ViewData["Message"] = "Your application description page."; 

            return View(); 
        } 

        public IActionResult Contact() 
        { 
            ViewData["Message"] = "Your contact page."; 

            return View(); 
        } 

        public IActionResult Error() 
        { 
            return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); 
        } 
    } 

Kindly try the above code snippet, if the issue still persists in at your side, kindly share the scheduler rendering code/image/video demo/running sample(if possible) for the better serve. 

Regards, 
Hareesh 



LA Lavita February 19, 2020 08:09 PM UTC

Thank you for your response.

 

I have another issue. I have installed Syncfusion.EJ2.AspNet.Core 17.4.0.49 version in my application. I am using the following in Layout: <script src="https://cdn.syncfusion.com/ej2/dist/ej2.min.js"></script> and material.css.

The issue I am facing is my code runs as expected locally but when I run it on server I am unable to save the edited recurring event. This happens only when I edit recurring event. The error I found in the console are as follows:

SCRIPT5007: Unable to get property 'StartTime' of undefined or null reference

1.        SCRIPT5007: SCRIPT5007: Unable to get property 'contains' of undefined or null reference

2.        SCRIPT5007: SCRIPT5007: Unable to get property 'getTime' of undefined or null reference



HB Hareesh Balasubramanian Syncfusion Team February 20, 2020 11:19 AM UTC

Hi Lavita, 

Thanks for the update. 

We have validated your reported problem and we have prepared a sample using previously provided code snippets with Syncfusion.EJ2.AspNet.Core 17.4.0.49 version and it is working properly at our end. And the sample can be downloaded from the following link, 
 
 
And for further reference, kindly refer the below UG links and screenshot of project version, 
 
UG links: 

Image
 
 
Kindly try the above sample and if the issue still persists at your side, kindly try to replicate the issue in our sample else share your scheduler rendering code/image/video/running sample(if possible) for the better serve. 
 
Regards, 
Hareesh 



PG Pon Geetha A J Syncfusion Team February 21, 2020 04:43 AM UTC

Thank you for your response. 
I am working on  Asp.net core 3.0 version.I have attached the document with screenshot of the error I get when I edit a recurring event and click on save. This issue is only in the live environment and for recurring event. 
Locally everything works as expected. 
  

error



PG Pon Geetha A J Syncfusion Team February 21, 2020 05:01 AM UTC

Thank you for your response. 
I am working on  Asp.net core 3.0 version.I have attached few related code and view with screenshot of the error I get when I edit a recurring event and click on save. This issue is only in the live environment and only for recurring event. Index.cshtml is the view and scheduledata.cs contains the models I use. 
Locally everything works as expected. 
 



HB Hareesh Balasubramanian Syncfusion Team February 21, 2020 12:27 PM UTC

Hi Lavita, 

Thanks for the update. 

We have validated your shared code snippets and we suspect that you have maintained the events for the scheduler locally which could be the cause, if you are using UrlAdaptor for the scheduler kindly maintain the appointments in DB. So, the CRUD actions will works properly. 

And for further reference, kindly refer the below UG link, 

Kindly try the above UG link and if you still face the issue please let us know. We awaiting to serve you better. 

Regards, 
Hareesh 



LA Lavita February 28, 2020 06:58 PM UTC

Thank you
I am not saving the data locally. Its saved in the DB. The thing is CRUD operation works fine for the non-recurring events, but only when editing recurring event I  am facing this issue, all the other operations work fine for the recurring event.



PG Pon Geetha A J Syncfusion Team March 2, 2020 11:20 AM UTC

Hello Hareesh, 
 
While debugging the code I found the starttime and endtime format as given below 
 
 
 
And also the data is getting loaded continuously as you can see the number of request is 5844 as shown below 
 
 
 
Could you help me out with this? 
 



HB Hareesh Balasubramanian Syncfusion Team March 2, 2020 12:19 PM UTC

Hi Lavita, 

Thanks for the update. 

We could able to reproduce the reported issue at our end and logged the below defect report. The fix will be included in our Volume 1 2020 main release which is expected at the end of March 2020.  Kindly be patience until then. 

Regards, 
Hareesh 



PG Pon Geetha A J Syncfusion Team May 8, 2020 04:41 AM UTC

Hello Team, 
Can you please let me know whether the addressed issue has been sorted? And is the release which was supposed to be by the end of March 2020 out? 
 



VM Vengatesh Maniraj Syncfusion Team May 11, 2020 06:51 AM UTC

Hi Geetha, 
 
Sorry for the delay. 
 
The reported problem has been addressed and included in our Volume 1 release which was rolled out by the end of March 2020. Please check the below feedback for more reference. 
 
 
Regards, 
Vengatesh 
 


Loader.
Up arrow icon