AJAX Endpoint
As of Aeon 5.0, a new AJAX (Asynchronous Javascript and XML) endpoint was added to return a JSON response containing all active scheduled closures. Closures are considered active if they have recurring dates or have a date in the future. Note: A response can be retrieved regardless of authentication.
Sample Response
GET | http://aeon.institution/aeon/aeon.dll/ajax?query=ScheduledDate |
---|
Results:
{"MinimumDays":2,"MaximumDays":90,"DefaultSchedule":["Monday","Tuesday","Wednesday","Thursday","Friday"],"ScheduledClosures":[{"ClosureDate":"2019-11-21T00:00:00.000","Description":"Thanksgiving","Recurring":"false"},{"ClosureDate":"2019-12-25T00:00:00.000","Description":"Christmas","Recurring":"true"},{"ClosureDate":"2019-01-01T00:00:00.000","Description":"New Year's","Recurring":"true"}]}
Scheduled-Date.js
To support the new blackout dates feature, the scheduled-date.js has been modified to automatically disable dates that are unavailable. To utilize the blackout date calendar, you will need to replace your current scheduled-date.js page with the new scheduled-date.js page in the Aeon 5.0 default webpages.
You can also edit the datepicker.js file to manipulate the results of the AJAX query. To create more complex closure rules, you can add one of the following values to the file:
- min date
- max date
- default schedule
- recurring holidays
- floating holidays