BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
DateTime[] nancy = new DateTime[] {
new DateTime(2019, 10, 8),
new DateTime(2019, 10, 9),
new DateTime(2019, 10, 10),
new DateTime(2019, 10, 11),
new DateTime(2019, 10, 12)
};
employees.Add(new ResourceDataSourceModel { text = "Nancy", id = 1, groupId = 1, color = "#df5286", dates = nancy }); |
isResourceUpdated = true;
var schObj = document.querySelector('.e-schedule').ej2_instances[0];
var resources = [];
var renderedDates = schObj.getCurrentViewDates();
for (var i = 0; i < empData.length; i++) {
for (var j = 0; j < empData[i].dates.length; j++) {
for (var k = 0; k < renderedDates.length; k++) {
var date = new Date(Date.parse(empData[i].dates[j]))
if (date.getTime() === renderedDates[k].getTime()) {
resources.push(empData[i].id);
k = renderedDates.length;
j = empData[i].dates.length;
}
}
}
} |
let resourcePredicate;
for (var a = 0; a < resources.length; a++) {
var predicate = new ej.data.Predicate("id", "equal", resources[a]);
resourcePredicate = resourcePredicate ? resourcePredicate.or(predicate) : predicate;
}
let resourceQuery = resourcePredicate ? new ej.data.Query().where(resourcePredicate) : new ej.data.Query();
schObj.resources[0].query = resourceQuery; |