Zabuto | Calendar | Action

Calendar Action


You can add a function to the calendar to execute when the onclick event is triggered on a specific day.

You are also able to add a function to the onclick event of the navigation to the previous or next month.

actionfunctionThe function to execute when a date is clicked.
action_navfunctionThe function to execute when the navigation to the previous or next month is clicked.

To retrieve the date for the date action you need to access the element information using the calendar day ID. You can also check if an event is available for this date. myDateFunction(this.id); function myDateFunction(id) { var date = $("#" + id).data("date"); var hasEvent = $("#" + id).data("hasEvent"); }

To retrieve information on the navigation action you need to access the element information using the calendar navigation ID. To can access the navigation info itself (prev/next) and information on the previous or next year and month. myNavFunction(this.id); function myNavFunction(id) { var nav = $("#" + id).data("navigation"); var to = $("#" + id).data("to"); }


...