Hello!
How do I edit the list of calendars for the field highligted on the print? In wich part I populate this field? Because on my application it only shows 'undefined'.
Hello!
Calendars are your resources in scope of the Calendar product. Please checkout this guide: https://www.bryntum.com/docs/calendar/#guides/data/project_data.md
The primary collections of the Project are:
Resources store. This is a flat store, keeping all resources (Calendars) of the Project. The collection is represented by a ResourceStore. The entity is represented by a ResourceModel.
You can check any of our demos to see what data is used, for example Basic demo:
Calendar/examples/basic/data/data.json
{
"success" : true,
"resources" : {
"rows" : [
{
"id" : "bryntum",
"name" : "Bryntum team",
"eventColor" : "blue"
},
{
"id" : "hotel",
"name" : "Hotel Park",
"eventColor" : "orange"
},
{
"id" : "michael",
"name" : "Michael Johnson",
"eventColor" : "deep-orange"
}
]
},
Cheers!
Pavlo Miklashevych
Sr. Frontend Developer
Oops, sorry. We will get this fixed. The stores and models are based on Scheduler. Please replace "#Calendar" with "#Scheduler" in the URL:
// replace this URL
https://www.bryntum.com/docs/calendar/#Calendar/model/ProjectModel#property-resourceStore
// With this one
https://www.bryntum.com/docs/calendar/#Scheduler/model/ProjectModel#property-resourceStore
Pavlo Miklashevych
Sr. Frontend Developer
I did everything and still not showing the category that I want to create. Can you give me more details to include calendars on the Calendar field? In the documentation i'ts not clear how I'm suppost to do.
The problem is that I can't find on the documentation where do I include a new category of calendar. In the Bryntum Calendar examples there always more then on type of Calendar like in this print that I'm sending. In those examples, there is no how to implement this list of calendars.
This list is a representation of what the resource store contains. Whenever you change the data in the store, your list is updated.
Please go to https://www.bryntum.com/examples/calendar/basic/ and open developer console. Run in console:
calendar.resourceStore.map(calendar => calendar.name)
// (3) ["Bryntum team", "Hotel Park", "Michael Johnson"]
You can see there are 3 calendars (resources)
You can remove them. Run this line:
calendar.resourceStore.removeAll()
You can see "No results" in the list:
You can add a new calendar:
calendar.resourceStore.add({ id : 'new_cal', name : 'My cal' })
Please let us know how to get "undefined" calendars. To create a testcase please modify one of our examples. How to ask for help is described here: viewtopic.php?f=35&t=772
Best regards,
Pavel
Pavlo Miklashevych
Sr. Frontend Developer
By the way, I see you are using the crud manager. Please check out these guide & docs:
https://www.bryntum.com/docs/calendar/#guides/data/crud_manager.md
https://www.bryntum.com/docs/calendar/#Scheduler/data/CrudManager
Pavlo Miklashevych
Sr. Frontend Developer