Currently, I am utilizing the DHTMLX Scheduler within my web application and aiming to access data for each event. Fortunately, I discovered a method to achieve this using scheduler._events which provides the following information:
1581498064943: {…}
_eday: 2
_end_date: undefined
_first_chunk: true
_last_chunk: true
_length: 1
_sday: 1
_sorder: 0
_sweek: 0
_timed: true
end_date: Date Tue Jan 02 2018 00:05:00 GMT+0100 (Central European Standard Time)
event_length: ""
event_pid: ""
id: 1581498064943
rec_pattern: ""
rec_type: ""
start_date: Date Tue Jan 02 2018 00:00:00 GMT+0100 (Central European Standard Time)
text: "New event"
The main issue arises when attempting to convert this data into a string format for JSON storage later on. During the conversion process, JavaScript automatically converts dates into iso 8601, resulting in the loss of a day:
"1581498064943": {
"start_date": "2018-01-01T23:00:00.000Z",
"end_date": "2018-01-01T23:05:00.000Z",
"text": "New event",
"id": 1581498064943,
"_timed": true,
"_sday": 1,
"_eday": 2,
"_length": 1,
"_sweek": 0,
"_sorder": 0,
"_first_chunk": true,
"_last_chunk": true,
"event_pid": "",
"event_length": "",
"rec_pattern": "",
"rec_type": ""
As a result, the date 2018-01-02 is incorrectly converted to 2018-01-01.