Defining scheduler config if I attach to other component

Good day

I notice the design of the Scheduler is to define the config before init() is called, but what do I do if I attach to e.g. dhxLayout?

I.e.
var dhxScheduler; // globally accessible

function dhxScheduler_init() {
dhxScheduler = a.attachScheduler(null,‘month’);
dhxScheduler.config.api_date="%Y/%m/%d %H:%i";
dhxScheduler.config.xml_date="%Y/%m/%d %H:%i";
}

For the lightbox changes I have to reset it first, then define new lightbox.
The api_date seems to take effect, however the xml_date does not, so I had to format the dates manually when loading.

If I can understand the intended operation I will probably find working with it easier.

Thank you

Hello,
‘attachScheduler’ takes a scheduler instance as a fourth argument,
docs.dhtmlx.com/api__link__dhtml … duler.html

So you can configure it before passing to attachScheduler.
Note that if you do not provide an instance explicitly, the method uses static window.scheduler instance, which also can be configured before attaching