class
SAPO.Ink.DatePicker
Version:
0.1
This is a refactoring from Component.DatePicker 2.1: option elementId changed from options to selector argument options dayId, monthId and yearId changed to *Field which support selector syntax|DOMElement moved stuff out of init() to constructor renamed init and render to _init and _render moved all attributes to _ prefix _isDate doesn't explode on bad input anymore made several fixes
Since:
Defined in
Ink/DatePicker/0.1/lib.js
October 2012
Constructor Summary
requires SAPO.Dom.Css
requires SAPO.Dom.Element
requires SAPO.Dom.Event
requires SAPO.Dom.Selector
Provides an easy to use datepicker for your form fields
Constructor Details
constructor DatePicker
DatePicker(String|DOMElement
selector, Object
options)
requires SAPO.Dom.Css
requires SAPO.Dom.Element
requires SAPO.Dom.Event
requires SAPO.Dom.Selector
Provides an easy to use datepicker for your form fields
Parameters:
selector
options
Options for the datepicker -
[ string instance ]
unique id for the datepicker -
[ string format ]
Date format string -
[ string cssClass ]
CSS class to be applied to the datepicker -
[ string position ]
position the datepicker. Accept right or bottom, default is right -
[ boolean onFocus ]
if the datepicker should open when the target element is focused -
[ function validDayFn ]
callback function to execute when 'rendering' the day (in the month view) -
[ String startDate ]
Date to define init month. Must be in yyyy-mm-dd format -
[ function onSetDate ]
callback to execute when set date -
[ Boolean displayInSelect ]
whether to display the component in a select. defaults to false. -
[ Boolean showClose ]
whether to display the close button or not. defaults to true. -
[ Boolean showClean ]
whether to display the clean button or not. defaults to true. -
[ String yearRange ]
enforce limits to year for the Date, ex: '1990:2020' (deprecated) -
[ String dateRange ]
enforce limits to year, month and day for the Date, ex: '1990-08-25:2020-11' -
[ Number startWeekDay ]
day to use as first column on the calendar view. Defaults to Monday (1) -
[ String closeText ]
text to display on close button. defaults to 'Fechar' -
[ String cleanText ]
text to display on clean button. defaults to 'Limpar' -
[ String prevLinkText ]
text to display on the previous button. defaults to '«' -
[ String nextLinkText ]
text to display on the previous button. defaults to '«' -
[ String ofText ]
text to display between month and year. defaults to ' de ' -
[ Object month ]
Hash of month names. Defaults to portuguese month names. January is 1. -
[ Object wDay ]
Hash of weekdays. Defaults to portuguese month names. Sunday is 0.