-
Calendar(elementID, options);
target: component in which we store the date (usually an text input).
options: see options.
return: a calendar object.
example: create one calendar for the 'calendar' id's element.document.observe('dom:loaded', function() { var calendar = new Calendar('calendar'); });
-
Calendar.bind(cssRule, options);
cssRule: A css rule represented by a string (more about css selectors).
options: see options.
return: An array of calendars.
example: create one calendar for all input which have a 'date' class.document.observe('dom:loaded', function() { var calendars = Calendar.bind('input.date'); });