Displays a calendar for date picking.
Instantiates the OAT.Calendarobject.optObj may contain:
Shows the calendar. It will appear at [x, y]. If date is specified, it will be pre-selected. All dates are in form of [year, month, day], starting from 1. When user selects a date, a callback(date) will be called.
array of 7 day names
array of 12 month names
array specifying which days should be special (weekends)
index of day (in OAT.Calendar.dayNames) when week starts
index of day (in OAT.Calendar.dayNames) for which Date::getDay() returns 0, i.e., "Sun".
CSS class of calendar div.
CSS class of previously selected day.
CSS class of special days, e.g., Sundays, holidays.
CSS class of div containing the year title and selection.
CSS class of div containing the month title and selection.
var c = new OAT.Calendar(); c.dayNames = ["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]; c.monthNames = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; c.specialDays = [0,0,0,0,0,1,1]; c.dayZeroIndex = 6; c.weekStartIndex = 6; c.show(100, 100, function(){});