For years I have been looking for a better solution to this issue. I would like to output 1 month of Calendar events in JSON format, also passing in a GET var for a different month and show those events.
Calendar Page is ideal to use, but has the following issues that prevent it from being a workable solution:
- Prints extremely annoying default Calendar javascript that cannot be removed without editing the asset php.
- Does not have Position formats so that I can edit the last JSON item and remove the comma to make it valid JSON. This can easily be done with an Asset Listing.
Other things I have thought about:
- Using an Asset Listing and Listing all Calendar Assets the filtering out the month in my application (does not sound fun)
- Using another Calendar type listing, but none of those provide what I need as well as Dynamic Params
- Calendar Event Search page, but for some reason that blows my mind, you cannot provide a event date range.
- JS API is NOT an option.
The last option I had thought about is a DB Source asset and does a DB query on the Matrix database. Then I could cleanly return the events how I want and pass in Dynamic Params.
Does anyone else have ideas? Why does it have to be so hard? It seems like such a simple thing...
Help me out and give me my sanity back on this issue!