I am looking to change the view of the daypilot chart when an event is triggered. Initially the Scheduler instance is used, but when the event is triggered I want to change this instance into Calendar instance. I am not being able to achieve this by simply changing the value of the variable by creating a new instance. So my question is how can i achieve two or multiple separate Daypilot instances at the click of a button??
I found the solution myself, would be of help to others if ever come across this question.
I simply used the dispose() method of the DayPilot, so when the event is triggered, I first got rid of the existing instance of Daypilot using dp.dispose(), then created the new Daypilot instance, i.e. new DayPilot.Calendar('--id--') and used dp.init(). Worked like a charm!
Comment posted by Dan Letecky [DayPilot] 8 years ago.
Thanks for posting the solution!
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.