DayPilot.Event.text

Returns the current event text or sets a new value.

Declaration

text()
text(newText)

The new value is applied when you call dp.events.update(e) [e.g. DayPilot.Scheduler.events.update()].

Parameters

  • newText (string) - new event text 

Note

When setting a new text value it automatically updates event HTML. See also DayPilot.Event.client.innerHTML().

Since version 2020.4.4701, strings set using the text() method is automatically HTML-encoded to prevent XSS attacks. To set raw HTML, use client.html() or modify data.html (see DayPilot.Event.data).

Return Value

If called without parameter, it returns an event text (string).

Example

var oldText = e.text();
e.text("New text");