How to get parsed Recurrece dates in vue or server?

Hi syncfusion support team.

I want to get parsing the recurrence rule in vue or server.

like this.

 from "FREQ=DAILY;INTERVAL=1" 

to 

Wed Jan 10 2018 10:00:00 GMT+0900 (Japan Standard Time)

Thu Jan 11 2018 10:00:00 GMT+0900 (Japan Standard Time)

Fri Jan 12 2018 10:00:00 GMT+0900 (Japan Standard Time) 

How can I do get?

I using this code snip for recurrence editor.

let recurElement = args.element.querySelector('#RecurrenceEditor');
                if (!recurElement.classList.contains('e-recurrenceeditor')) {
                    let recurrObject = new RecurrenceEditor({});
                    recurrObject.appendTo(recurElement);
                    scheduleObj.eventWindow.recurrenceEditor = recurrObject;

                    let recurrenceEditorObj =
                        args.element.querySelector('.e-recurrenceeditor').ej2_instances[0];
                    recurrenceEditorObj.frequencies = ['none''daily''weekly'];
                }
               
                document.getElementById('RecurrenceEditor').style.display = (scheduleObj.currentAction == 'EditOccurrence') ? 'none' : 'block';



1 Reply

VD Vinitha Devi Murugan Syncfusion Team September 13, 2021 06:26 AM UTC

Hi Alejandro, 
 
Greetings from Syncfusion Support. 
 
We have validated your reported query “Want to get parsing the recurrence rule in vue or server” and achieved your requirement by using actionBegin event of our scheduler with getRecurrenceDates method. We have prepared the below sample for your reference.  
 
 
onActionBeginfunction (args) { 
    if (args.requestType === "eventCreate") { 
        let data = args.data[0]; 
        if (!isNullOrUndefined(data.RecurrenceRule)) { 
            const recurrenceElement = document.querySelector( 
                ".e-recurrenceeditor" 
            ); 
            // Here we are taking the recurrence object 
            const recurrenceObj = recurrenceElement.ej2_instances[0]; 
            // Here we get all occurrences dates using getRecurrenceDates method 
            let occurrenceDate = recurrenceObj.getRecurrenceDates( 
                data.StartTime, 
                data.RecurrenceRule 
            ); 
            occurrenceDate.forEach((date=> { 
                console.log(new Date(date)); 
            }); 
        } 
    } 
 
Also, we suggest you to refer the below UG links for more information. 
 
 
Kindly try with the above solutions and get back to us if you need any further assistance. 
 
Regards, 
Vinitha 


Loader.
Up arrow icon