How do you get the current y_unit in onBeforeEventCreated

How do you get the current y_unit in onBeforeEventCreated

Hello @yaof72678,

You can get the y_unit of the created event with the getActionData method, like follows:

scheduler.attachEvent("onBeforeEventCreated", function (e){
    const action_data = scheduler.getActionData(e).section;
    console.log(action_data)
    return true;
});

Here is a demo:
https://snippet.dhtmlx.com/7jv2i2je

Kind regards,