Scheduler Recurring appointments and CRUD functionality

HI,   I am working with the schedule and am having some issues that I cannot get around.  I downloaded the sample at http://www.syncfusion.com/downloads/support/forum/136849/ze/EJ2ScheduleSample-1331300731  you provided in another thread to learn from and am having the following problems:

  1. The UpdateData method  public List<ScheduleEvent> UpdateData([FromBody]EditParams param) in the controller always returns the param as null when an appointment is edited to have a recurring interval.  If an appointment is edited without a recurrence it makes the update as expected.     What do I need to do to have the editing functionality work for recurring appointments?
  2. The scheduler does not display recurring appointments as expected.   I have an appointment that the following recurrence FREQ=WEEKLY;BYDAY=TU;INTERVAL=1;COUNT=3; however only the first appointment is displayed on the scheduler.   The remaining two appointments are nowhere to be found.  I created the appointment in the scheduler sample in the UI and did not edit the database directly.
It is pretty important that I get this working as the schedule with complete CRUD functionality will be a critical part of my project.

Thanks


5 Replies

VS Velmurugan S Syncfusion Team April 24, 2018 04:30 PM UTC

Hi Shawn, 

Thanks for Contacting Syncfusion support. 

Please find the following responses for your queries: 

Query #1: What do I need to do to have the editing functionality work for recurring appointments?  
 
We suspect that the reported problem might have been occurred due to the appointment field count or its type mismatch or wrong field name mapping with the default appointment collection. Therefore, we request you to ensure it once with the fields used in your application and also for your reference, we have depicted the below images to show the working of creation and editing of both normal and recurrence appointments and also getting the “param” details properly as shown in the below screenshot. Similarly, getting the param details properly while editing the recurrence appointment has also been shared in the below screenshot.  
 
Editing normal appointment into recurrence appointment: 
 
 
 
 
 
 
 
 
 
Editing recurrence appointment: 
 
 
 
 
 
 
 
Query #2: The scheduler does not display weekly recurring appointments as expected in the sample. 
 
This problem might be suspected due to the missing filtering logic used within the LoadData method for recurrence appointments. In our previously shared sample, we filtered the appointments based on the start and end date value. In this case, for recurrence kind of appointments – all the recurring appointments needs to be fetched and assigned to the Schedule dataSource for proper filtering of its instances on each date ranges during navigation. Therefore, we suggest you change the filtering condition alone as shown below. 
 
<Code> 
                 
        public List<ScheduleEvent> LoadData() 
        { 
            return _context.ScheduleEvents.ToList(); // You do not wish the external filtering use this code 
        } 
 
Or 
 
        public List<ScheduleEvent> LoadData([FromBody]Params param) 
        { 
            return _context.ScheduleEvents.ToList().Where(app => (app.StartTime >= param.StartDate && app.StartTime <= param.EndDate) || (app.RecurrenceRule !=null && app.RecurrenceRule != "")).ToList(); // If you need the external filtering use this code 
        } 
 
</Code> 

We have modified the sample with the above code example (1st option), which can be downloaded from the following location. 

Kindly try with the above sample, if you still facing any issues with the editing process, please revert back to us with some more details like how do you edit the appointments (both normal and recurrence appointments) and on specific different use-case or application-end customized scenario and If possible, try to reproduce the issue in the above sample. The information that you share will be helpful for us to proceed further on this. 
 
Regards, 
Velmurugan 



PS Phil Seeman August 31, 2019 04:33 PM UTC

Hi, I've tried your sample http://www.syncfusion.com/downloads/support/directtrac/204106/ze/EJ2ScheduleSample1439299043 and found that it does not behave properly when editing a recurring appointment. Specifically, if I have a recurring appointment and I drag one side of its box to change its duration, the duration is changed but a new recurring appointment is also created with the previous duration.

I can see this happens because in this case, "param" has an Action of "batch" and it contains two elements, an "added" and a "changed". The "changed" element is correct and changes the duration per my dragging operation. But the "added" is the problem; it adds a new recurring event which should not be happening.

Do you have any suggestions as to how to resolve this issue?


NR Nevitha Ravi Syncfusion Team September 2, 2019 12:51 PM UTC

Hi Phil, 

Sorry for the inconvenience caused. 

We have modified the sample to perform CRUD actions on recurring appointment which can be downloaded from the following link. 

Please check the sample and let us know if you need any further assistance. 

Regards, 
Nevitha 



PS Phil Seeman September 2, 2019 07:14 PM UTC

Hi Nevitha,

I'm afraid this version is worse.

First, every appointment I enter gets shifted to be 4 hours later when I click "Save". I suspect this is a time zone setting somewhere but I'm unable to locate any such setting in the code.

Second, this version is not displaying recurrences at all. If I create a recurring appointment, it's displayed only on the first occurrence date. No subsequent occurrences are showing at all.


HB Hareesh Balasubramanian Syncfusion Team September 4, 2019 05:11 PM UTC

Hi Phil, 

Sorry for the inconvenience caused. 

We have modified our previous sample to the current 17.2.49 version, 

Q1: Kindly use the below snippet for the time zone related issues in the startup.cs file, 

    public void ConfigureServices(IServiceCollection services) 
        { 
            services.AddDbContext<ScheduleDataContext>(options => options.UseSqlServer("Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFilename=" + Directory.GetCurrentDirectory() + "\\App_Data\\ScheduleData.mdf;Integrated Security=True;Connect Timeout=30")); 
            services.AddMvc(); 
            services.AddMvc() 
                .AddJsonOptions(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver()) 
                .AddJsonOptions(opt => opt.SerializerSettings.DateFormatHandling = Newtonsoft.Json.DateFormatHandling.MicrosoftDateFormat) 
                .AddJsonOptions(opt => opt.SerializerSettings.DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Local); 
        } 

Q2: In data base there will be one recurrence event will present and based on the ReucrrenceRule in the data base the other occurrence events will be handled in the source side. 

And for further reference, please download the below sample link, 

Please try the above sample, if you have any concerns please revert us back for further assistance. 

Regards, 
Hareesh 


Loader.
Up arrow icon