scheduler.config.hour_date not working when change format

Hi Everyone.
I’m trying config scheduler.config.hour_date.
But it’s not working.
Please take a look my code:

scheduler.config.xml_date = "%Y-%m-%d %h:%i";
scheduler.init("scheduler_here",new Date(2009,5,30),"week");
scheduler.parse(small_events_list, "json");

//i'm trying config it after init, because i want change it after that
scheduler.config.hour_date = '%g:%i %A';
scheduler.setCurrentView(scheduler._date,"week");

if config it before init its works. But it’s not correct what i want.

scheduler.config.xml_date = "%Y-%m-%d %h:%i";
scheduler.config.hour_date = '%g:%i %A';
scheduler.init("scheduler_here",new Date(2009,5,30),"week");
scheduler.parse(small_events_list, "json");

Please go here docs.dhtmlx.com/scheduler/snippet/e4a91ebe then click button RESET before paste this code.
Thank you

Hello,

You need to set configs before initialization for displaying the Scheduler according to them.

If you want to change date format in the event header after init, you can specify the event’s header template
docs.dhtmlx.com/scheduler/day_vi … lates.html

Example:
docs.dhtmlx.com/scheduler/snippet/4fbc5411

Thank you for your help @Polina
I did change it like this, and its works :slight_smile:

[code]scheduler.config.xml_date = “%Y-%m-%d %h:%i”;

scheduler.init(“scheduler_here”,new Date(2009,5,30),“week”);
scheduler.parse(small_events_list, “json”);

var formatFunc = scheduler.date.date_to_str("%G:%i");
scheduler.templates.event_header = function(start,end,ev){
return formatFunc(start)+" - "+formatFunc(end);
};
scheduler.updateView();[/code]
But it just works with Week not Month. It’s same with your example.
How can fix month too?

Ignore it. I did fix it.
Thank you so much