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

How can I fetch value of new column from database and display it on the calendar?

Related article: HTML5/JavaScript Calendar with Day/Week/Month Views (PHP, MySQL)
Asked by Quy
4 years ago.

Hi,
I've just created a new column named "staff" to "event" table from sample "day-week-month" database.
In the backend_events.php, I add this:
...
foreach($result as $row) {
$e = new Event();
$e->id = $row['id'];
$e->text = $row['name'];
$e->start = $row['start'];
$e->end = $row['end'];
$e->staff = $row['staff'];
$events[] = $e;
}
...
but How can I make it display on the front-end view of the calendar? like this: http://prntscr.com/qi3gw2

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

You can use onBeforeEventRender event handler to modify the event HTML (args.data.html) using the staff column (args.data.staff):

https://doc.daypilot.org/calendar/event-customization/

You can also modify the $e->text value on the server side (in your snippet above).

Comment posted by Quy
4 years ago.

Thanks but I am using trial version, can I make use of that modification and other functions written in the doc?

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