search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Multiple lines/rows in scheduler.events.list.text?

Asked by Anonymous
8 years ago.

Hi,

I changed the height of the events in my scheduler because I need to show multiple lines of text for every event.

The code:
rowMinHeight: 60,
eventHeight: 60,

But how do I actually append multiple lines into the event? adding "\n" to the text doesn't seem to work.
This doesn't work:
schedulerEvent.text = event.title+"\n"+event.user.name;

Answer posted by Dan Letecky [DayPilot]
8 years ago.

For overriding the event HTML, use the .html property. In order to add a line break, use "<br/>":

dp.events.list = [
  {
    start: "2015-12-01",
    end: "2015-12-05",
    text: "Event 1",
    id: 1,
    resource: "R1",
    tags: { username: "john" }
  }
];

dp.onBeforeEventRender = function(args) {
  args.data.html = args.data.text + "<br/>" + args.data.tags.usename;
};

You can also add html directly to the event data:

dp.events.list = [
  {
    start: "2015-12-01",
    end: "2015-12-05",
    text: "Event 1",
    id: 1,
    resource: "R1",
    html: "Event 1<br/>John"
  }
];

See also:

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.