Hi,
I am using igScheduler and I am having a problem when I add more than 10 appointments in a single day. I have also tried it on your jsFiffle demo and occures the same. (http://jsfiddle.net/gh/get/jquery/1.9.1/igniteuisamples/jsfiddle-samples/tree/master/EN/HtmlSamples/scheduler/subject-indicators/)
If there are less than 11, it works correctly but if not it shows the following error:
Thanks for your attention.
Best regards!
Hello Omar,
I have tested the shared sample and have added 12 appointments, however, no error was displayed and all appointments are added successfully. Could you please let me know the exact scenario and provide steps to reproduce so that I can test and debug it.
Alternatively, if the behavior cannot be replicated please feel free to provide your own sample. Remove any external dependencies and code that is not directly related to the issue, zip your application and attach it in this case.
Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.
Thank you for your cooperation.
Looking forward to hearing from you.
Regards, Monika Kirkova, Infragistics
Hi, Monika!Thanks for your answer. I have tried how you did it and it is worjing to me as well. Sorry for not specifying, but I got the problem while adding the appointments through the js. I append the js you can paste javaScript section and get the error.
Omar.
---------- CODE -----------
appointments1 = [{ "resourceId": 1, "id": 11, "start": new Date(currentYear, currentMonth, 2, 6, 45), "end": new Date(currentYear, currentMonth, 3, 6, 45), "subject": "Marketing conference" }, { "resourceId": 6, "id": 5, "end": new Date(currentYear, currentMonth, 3, 12, 45), "start": new Date(currentYear, currentMonth, 3, 13, 45), "subject": "Dentist appointment" }, { "resourceId": 11, "id": 10, "start": new Date(currentYear, currentMonth, 4, 8), "end": new Date(currentYear, currentMonth, 4, 8, 30), "subject": "Distributions sync", "description": "Sync with distributions team" }, { "resourceId": 2, "id": 2, "start": new Date(currentYear, currentMonth, 8, 11), "end": new Date(currentYear, currentMonth, 8, 12), "subject": "Company meeting", "location": "Zero hub hall", "description": "A company meeting" }, { "resourceId": 8, "id": 7, "start": new Date(currentYear, currentMonth, 9, 11, 45), "end": new Date(currentYear, currentMonth, 9, 14, 45), "subject": "UX training", "location": "Training hall Dragon", "description": "Monthly user expirience training" }, { "resourceId": 5, "id": 4, "start": new Date(currentYear, currentMonth, 10, 5, 45), "end": new Date(currentYear, currentMonth, 10, 6, 15), "subject": "Certification exam", "location": "Exam room 1" }, { "resourceId": 7, "id": 6, "start": new Date(currentYear, currentMonth, 14, 7, 45), "end": new Date(currentYear, currentMonth, 16, 7, 45), "subject": "Web Talks Conference", "location": "Conference hall Universe", "description": "A conference about modern web technologies and trends" }, { "resourceId": 3, "id": 32, "start": new Date(currentYear, currentMonth, 24, 12, 45), "end": new Date(currentYear, currentMonth, 24, 14, 45), "subject": "Team Building", "location": "Hawaii plaza hotel", "description": "Have a teambuilding with colleges" }, { "resourceId": 4, "id": 3, "start": new Date(currentYear, currentMonth, 30, 11), "end": new Date(currentYear, currentMonth, 30, 12), "subject": "Buisness lunch", "location": "The Lavender Road", "description": "Discuss the new rental system with partner" }, { "resourceId": 10, "id": 9, "start": new Date(currentYear, currentMonth, 19, 9, 45), "end": new Date(currentYear, currentMonth, 19, 9, 55), "subject": "Morning Yoga class", "location": "Training room life" }, { "resourceId": 9, "id": 8, "start": new Date(currentYear, currentMonth, 25, 13, 15), "end": new Date(currentYear, currentMonth, 25, 16, 15), "subject": "Release review", "location": "Conference room Unity", "description": "Release review sync" }, { "id": 11, "start": new Date(currentYear, currentMonth, 26, 10, 45), "end": new Date(currentYear, currentMonth, 26, 12, 45), "subject": "Interview", "location": "Guest room 1", "description": "Interview the candidate for Principal Program Agent" }, { "id": 12, "start": new Date(currentYear, currentMonth, 26, 11, 45), "end": new Date(currentYear, currentMonth, 26, 12, 45), "subject": "Interview", "location": "Guest room 2", "description": "Interview the candidate for Principal Program Agent" }, { "id": 13, "start": new Date(currentYear, currentMonth, 26, 12, 45), "end": new Date(currentYear, currentMonth, 26, 13, 45), "subject": "Interview", "location": "Guest room 3", "description": "Interview the candidate for Principal Program Agent" }, { "id": 14, "start": new Date(currentYear, currentMonth, 26, 13, 45), "end": new Date(currentYear, currentMonth, 26, 14, 45), "subject": "Interview", "location": "Guest room 4", "description": "Interview the candidate for Principal Program Agent" }, { "id": 15, "start": new Date(currentYear, currentMonth, 26, 14, 45), "end": new Date(currentYear, currentMonth, 26, 15, 45), "subject": "Interview", "location": "Guest room 5", "description": "Interview the candidate for Principal Program Agent" }, { "id": 16, "start": new Date(currentYear, currentMonth, 26, 15, 45), "end": new Date(currentYear, currentMonth, 26, 16, 45), "subject": "Interview", "location": "Guest room 6", "description": "Interview the candidate for Principal Program Agent" }, { "id": 17, "start": new Date(currentYear, currentMonth, 26, 16, 45), "end": new Date(currentYear, currentMonth, 26, 17, 45), "subject": "Interview", "location": "Guest room 7", "description": "Interview the candidate for Principal Program Agent" }, { "id": 18, "start": new Date(currentYear, currentMonth, 26, 17, 45), "end": new Date(currentYear, currentMonth, 26, 18, 45), "subject": "Interview", "location": "Guest room 8", "description": "Interview the candidate for Principal Program Agent" }, { "id": 19, "start": new Date(currentYear, currentMonth, 26, 18, 45), "end": new Date(currentYear, currentMonth, 26, 19, 45), "subject": "Interview", "location": "Guest room 9", "description": "Interview the candidate for Principal Program Agent" }, { "id": 20, "start": new Date(currentYear, currentMonth, 26, 19, 45), "end": new Date(currentYear, currentMonth, 26, 20, 45), "subject": "Interview", "location": "Guest room 10", "description": "Interview the candidate for Principal Program Agent" }, { "id": 21, "start": new Date(currentYear, currentMonth, 26, 20, 45), "end": new Date(currentYear, currentMonth, 26, 21, 45), "subject": "Interview", "location": "Guest room 11", "description": "Interview the candidate for Principal Program Agent" }, { "id": 23, "start": new Date(currentYear, currentMonth, 26, 22, 45), "end": new Date(currentYear, currentMonth, 26, 23, 45), "subject": "Interview", "location": "Guest room 12", "description": "Interview the candidate for Principal Program Agent" } ]
$(function () { $("#scheduler").igScheduler({ height: "650px", width: "100%", selectedDate: today, views: ["monthView", "agendaView"], dataSource: appointments1, resources: resources }); });
After investigating this further, I have determined that when there are more than 10 appointments in one day a hash code for the different appointments is generated. What I could suggest in order to add more appointments in one day is to add the rest of the appointments using the “createAppointment” method. This could be achieved as follows:
$("#scheduler").igScheduler({
. . .
dataSource: appointments1,
rendered: function (evt, ui) {
setTimeout(() => {
addAppointment();
}, 100);
},
resources: resources
});
function addAppointment() {
$("#scheduler").igScheduler("createAppointment", {
"id": 23,
"start": new Date(currentYear, currentMonth, 26, 22, 45),
"end": new Date(currentYear, currentMonth, 26, 23, 45),
"subject": "Interview",
"location": "Guest room 12",
"description": "Interview the candidate for Principal Program Agent"
}
Below I am attaching a sample demonstrating the described behavior. Please test it on your side and let me know if you need any further information regarding this matter.
igScheduler.zip
I am glad that you find my suggestion helpful and were able to achieve your requirement.
Thank you for using Infragistics components.
Hi, Monika:It solved the problem.
Thanks for all.Regards,