Sounds pretty cool
Here is my solution. Read the comments.
(function($){ function getMonthEvents(year, month, calendarId){ return {11: "My birthday.", 23: "My anniversary" }; }
Disadvantages:
The _updateDatepicker method is also called when the user selects the daily form of the visible month or when you set the date via datepicker('setDate', theDate) , which may be a little inefficient.
It relies on a private Datepicker function, if in future versions they decide to change its functionality or change its name, this code will break. Although, due to the nature of the function, I do not see this happening any time soon.
Note: My first approach was to hook into the onChangeMonthYear event for ui.datepicker , but since the event fires before replacing the dates in the calendar, the addTipsys method will add the tipsy to the calendar dates that are about to clear. Therefore, you must raise the addTipsys event AFTER the items are updated.
EASY HACK: Pick up a method on the onChangeMonthYear event of your calendar and setTimeout to trigger a drunkard. Some validation needs to be done.
guzart
source share