search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Javascript Event Calendar Modal Update

Asked by Mike
1 year ago.

Have a javascript event calendar. When the user clicks on an event it fires dp.onEventClick to bring up a modal to provide further details from the event (it's read-only so no worries about writing/editing).

I need to enable what's essentially an advanced view containing additional data, so what I'd like to do is put a button/link within the existing modal that when clicked upon will do one of two things (whichever is the least painful). a) update the existing modal with the additional extra data or b) pop up an additional modal on top of the first just containing the additional data.

Is this possible?

Answer posted by Dan Letecky [DayPilot]
1 year ago.

You can simply use JavaScript/jQuery to modify the page content. If needed, you can call stretch() to update the modal dimensions to fit the content:
https://api.daypilot.org/daypilot-modal-stretch/

If you display a standalone page in the modal dialog (i.e. showUrl() in combination with the default useIframe = true) you can also reload the page or navigate to a different url. This will update the modal content.

It is also possible to open a new dialog on top of the previous one but if you use the iframe mode you'll need to open it from the parent page. Otherwise the view will be limited by the iframe viewport.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.