Extra data for appointment
I want to have some extra field for an appointment, and looked at the resources-fields documentation, but cant get it working. I added some property to the resourcefields, but it wont show up when I do:
console.log($cheduleElement.getSlotByElement(cell));
this shows only the id's, a text and a classname. How can I get extra associated data that is available in my datasource?
console.log($cheduleElement.getSlotByElement(cell));
this shows only the id's, a text and a classname. How can I get extra associated data that is available in my datasource?
SIGN IN To post a reply.
3 Replies
SE
Sellakumar
Syncfusion Team
January 15, 2018 10:02 AM UTC
Hi Wouter,
Thanks for contacting Syncfusion support.
In Schedule, there is no default option to add extra fields under the resources. In resourceSettings field, we can add the extra fields and values should be maintained in the datasource. These values can be easily accessible from the public method getSlotByElement. The workaround solution for this requirement as follows:
<code>
$("#Schedule1").ejSchedule({
width: "100%",
height: "525px",
currentDate: new Date(2018, 0, 1),
group: {
resources: ["Owners"]
},
resources: [{
field: "OwnerId", title: "Owner",
name: "Owners", allowMultiple: true,
resourceSettings: {
dataSource: [
{ text: "Nancy", id: 1, groupId: 1, color: "#f8a398", customField: "Busy" },
{ text: "Steven", id: 3, groupId: 2, color: "#56ca85", customField: "Tentative" },
{ text: "Michael", id: 5, groupId: 1, color: "#51a0ed", customField: "Free" },
{ text: "Milan", id: 13, groupId: 3, color: "#99ff99", customField: "Free" },
{ text: "Paul", id: 15, groupId: 3, color: "#cc99ff", customField: "Tentative" }
],
text: "text", id: "id", groupId: "groupId", color: "color", field: "customField"
}
}],
appointmentSettings: {
resourceFields: "OwnerId"
}
});
</code>
Kindly check the above workaround solution and revert us with further details, if we have misunderstood your requirement or else if you need any further assistance on this.
Regards,
Sellakumar K
WO
Wouter
January 15, 2018 10:44 AM UTC
Thanks. Your answer in thread 135435 actually helped me achieve my goal.
VS
Velmurugan S
Syncfusion Team
January 16, 2018 10:13 AM UTC
Hi Wouter,
We are glad to hear that our solution fulfilled your requirement. Kindly let us know, if you need any further assistance.
Regards,
Velmurugan
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
WO Wouter
- Jan 12, 2018 01:35 PM UTC
- Jan 16, 2018 10:13 AM UTC