Hi,
How do I re-initialize active links after initializing scheduler?
Basically, I have created a settings page wherein users can select the date format they want. I can easily change the format by doing:
var chosenDateFormat;
if (optionChosen == 1) chosenDateFormat = '%D, %m/%j';
else if (optionChosen == 2) chosenDateFormat = '%j/%m/%Y';
else if (...) ...
else ...
scheduler.templates.timeline_scale_date = scheduler.date.date_to_str(chosenDateFormat);
The pseudo-code above successfully changes the date format of the template I chose to do it to. However, the links disappear.
I’ve tried this:
scheduler.templates.timeline_scale_date = function (date) {
var d_s = scheduler.date.date_to_str(chosenDateFormat);
return "<a jump_to='" + d_s(date) + "' href='#'>" + scheduler.date.date_to_str(chosenDateFormat) + "a</a>";
}
…but that returns with “function anonymous() { [native code] }”. Also, by simply setting the config.active_link_view = ‘day’, for example, does nothing prior to calling updateView.
Any help is greatly appreciated.
Thank you,
Jim