FullCalendar with parameter passing to "other" Modal

Here is my (test) scenario that is currently working just fine:

  1. I have created my own modal dialog with some fields for FullCalendar
  2. I can click on any day in the calendar, and it will pass the start and end dates as parameters and place them in the start and end date fields respectively.
  3. In “month view” it automatically select the “allDay” option (with start date for example 2021-10-22 00:00 and end date then 2021-10-23 00:00 if only one day was selected) OR
  4. assume 3 days was selected, it will automatically select the “allDay” option (with start date e.g. 2021-10-22 00:00 and end date then 2021-10-24 00:00)
  5. On completion of the form (modal), the user can submit the form and through AJAX the database is updated (I’m using the “Route-Action” for this).

So now I would like to use say my “event” table (for my events calendar - using FullCalendar), but I want to use the event table modal for this purpose (instead of me writing it myself - again).
I’m now using the call:

$('#eventUrl').attr('href',ew.modalDialogShow({lnk:this,btn:'AddBtn',url:'eventadd'}));

which is working fine, however I would like to pass the start date that the user selected and the end date the user selected, in to the eventadd modal and populate the relevant fields accordingly. I have been searching the forum, and being “Googling” but cannot find a definitive answer. Most answers are generalized (for writing every single line of code yourself, and not of much help).If I use the following call (not sure would this be the correct way of calling the modal - I doubt, but again was trying things out):

$('#eventUrl').attr('href',ew.modalDialogShow({lnk:this,btn:'AddBtn',url:'eventadd?start='+info.start+'&end='+info.end}));

Pressing F12, and looking at the Network options, I can see the call was made successfully, i.e. the URL passed with the correct parameters/values. How do I get this into the modal, and then populating the correct fields? Thanks in advance.

https://discourse.hkvstore.com/t/call-ew-modaldialogshow-in-custom-file/4839/1