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

onTimeRangeSelected: giving 3 value start/end/resource

Asked by Sapan Kumar
3 years ago.

onTimeRangeSelected: giving 3 value start/end/resource

how can i get more data, wanted access custom values like room category so on...


foreach($rooms as $room) {
$r = new Room();
$r->id = $room['rm_no'];
$r->name = $room['rm_no'];
$r->rm_cat = $room['rm_Cat'];
$r->capacity = 2;
$r->status = $room['status_f'];
$result[] = $r;


header('Content-Type: application/json');
echo json_encode($result);

How can i access rm_cat in onTimeRangeSelected event?

dp.onTimeRangeSelected = function (args) {
How can i access rm_cat here
//var name = prompt("New event name:", "Event");
//if (!name) return;
console.log ( args );
var modal = new DayPilot.Modal();
modal.closed = function () {

// reload all events
var data = this.result;
if (data && data.result === "OK") {

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

The original data object is accessible as "data" property of the row object. You can get the row object (DayPilot.Row class) using .rows.find():

var row = dp.rows.find(args.resource);
var rm_cat =;
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.