Add link to be able to enter new event

In the month view, we want to be able to place an icon “+” in the date header that when clicked opens our custom Enter New Event URL.

Is there an easy mechanism to do that? Or is there some other recommended way to handle this?

You can redefine related template

var format = scheduler.date.date_to_str("%j %M %Y"); scheduler.templates.month_scale_date = function(date){ return "<span onclick='do_something()'>+</span>"+format(date); };

docs.dhtmlx.com/doku.php?id=dhtm … _templates

That was close, it put the text in the week headers of the month view, not the day.

I tried setting month_day but that didn’t seem to work.

Check the attached sample.
1294327638.zip (49.4 KB)

Should scheduler.init and scheduler.load generally be the last statements in my javascript?

The behavior I noticed is that I do get the formats displayed, but only when I resize the window.

Hello,

Though most times order should not matter still sometimes it does, so it’s better to do it following way:

  1. Configuration (config settings, templates, custom views, events handlers)
  2. Scheduler’s init
  3. setLoadMode (if necessary)
  4. Load
  5. Dataprocessor

Best regards,
Ilya