Add new elements to scheduler.toICal() method

I want to add few more elements to scheduler.toICal() method.
I want to export location and description along with default elements (startdate, enddate, summary)

I have tried following function but it is not supported in ical format

        scheduler.data_attributes = function () {
            return [
                ["id"], ["text"], ["date_start"], ["date_end"],
                ["location"], ["description"]
            ];
        };

Does anyone know how to add location and description element to ical format string?

Thanks

Hello,
unfortunately the current implementation of iCal method does not support custom properties, as you can see from the sources all values are hardcoded:
github.com/DHTMLX/scheduler/blo … ize.js#L99
What you can do is redefine this method from your code, adding all needed values

I have tried to add custom attributes to dhtmlxscheduler_serialize.js file in ical function but it is not getting custom attribute’s value.

I have tried this

,d.push(“SUMMARY:”+s.text),d.push(“LOCATION:”+s.customLocation)

but as output it is returning undefined as a value of LOCATION.

Does any one know to achieve custom attributes to .ical() method?

Thank you.

Hi,
make sure that ‘customLocation’ property of your events is not empty.

As you can see from the sources, the method receives event objects as they are on the client, no properties skipped

github.com/DHTMLX/scheduler/blo … ize.js#L12
github.com/DHTMLX/scheduler/blo … ize.js#L12