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

Showing Custom Data

Related article: Angular 5 Scheduler Quick Start Project
Asked by Santhosh Kumar
9 months ago.

I want to show data which is customized.

your data format
{
id: 11,
start: 01-08-2018,
end: 02-08-2018,
title: 'Appointment 13'
}
(the above data may not be fixed you format)

but i want to show our own customized data, please see the below object format
{
"dayId": "2018-05-01",
"dayName": "Tuesday",
"doctorCount": 0,
"appointmentsCount": 0,
"bookedCount": 0,
"cancelledCount": 0,
"missedCount": 0
}

Answer posted by Dan Letecky [DayPilot]
9 months ago.

The Scheduler requires the key data (such as event start, end, id) to be stored in specific properties. You need to transform your data items to match the required structure. You can use map() to do that (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).

The required structure is described here:
https://api.daypilot.org/daypilot-event-data/

In addition to the properties recognized by the Scheduler you can also include custom properties. It's recommended to specify the custom properties using the "tags" object to avoid name conflicts but it's not enforced.

You can use the custom properties to customize the event appearance and behavior in onBeforeEventRender event handler:
https://api.daypilot.org/daypilot-scheduler-onbeforeeventrender/

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