Class Index | File Index

Classes


Class SweetDevRia.SimpleCalendar

RIA Simple Calendar implementation.
Defined in: SimpleCalendar.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
SweetDevRia.SimpleCalendar(id, containerId, monthyear, selected)
Field Summary
Field Attributes Field Name and Description
 
CSS class for date bad format.
 
HTML day date field object.
 
HTML month date field object.
 
HTML year date field object.
 
HTML hidden date field object.
 
Single date field HTML object.
Method Summary
Method Attributes Method Name and Description
 
acceptDate(dateField)
This function checks the date on input type field(s).
 
addExplodedDateField(yearFieldId, monthFieldId, dayFieldId)
Set the 3 input HTML text fields (day, month and year) synchronized with the calendar.
 
addHiddenDateField(hiddenDateFieldId)
Set the input HTML hidden field on calendar in order to update selected date(s).
 
addSingleDateField(singleDateFieldId)
Set the input HTML text field synchronized with the calendar.
<private>  
This fonction throw an exception if the range is not valid to be sure that the date is well formatted
 
Clear all bad format CSS style class on input type.
 
Desactivate the calendar.
 
doSelectCell(e, cal)
 
Empty dates HTML input text fields (single field and 3 parts fields).
 
Fill dates HTML input text fields (single field, 3 parts fields and hidden fields).
 
This function return the error message depending on the exception
 
This fonction return a parsed date If it's correct, the parsed date is returned, if not, an error class is returned
 
Returns selected date(s).
 
This function handle a date error
 
This is an overridden function from RiaComponent.
 
Handle keydown on input fields.
 
This fonction return a boolean component if calendar is visible,
 
This function check if date is out of the range or not
 
This function check if date is a restricted date (= not selectionable) or not.
 
Is the date from input field valid ?
 
Selects a cell corresponding to the date in parameter To be overridden
 
Clean the date selected, clean HTML date input text fields and desactivate the calendar.
 
This function set the new date on calendar.
 
This function set the new date on calendar and fills html inputs fields.
 
This function set a new date value from a date If it's correct, date is set on the Calendar, if not, an error class is returned
 
This function set a new date value from a date If it's correct, date is set on the Calendar, if not, an error class is returned
 
Yahoo method override.
Class Detail
SweetDevRia.SimpleCalendar(id, containerId, monthyear, selected)
Parameters:
{String} id
The id of the table element that will represent the calendar widget
{String} containerId
The id of the container element that will contain the calendar table
{String} monthyear
The month/year string used to set the current calendar page
{String} selected
A string of date values formatted using the date parser. The built-in default date format is MM/DD/YYYY. Ranges are defined using MM/DD/YYYY-MM/DD/YYYY. Month/day combinations are defined using MM/DD. Any combination of these can be combined by delimiting the string with commas. Example: "12/24/2005,12/25,1/18/2006-1/21/2006"
Field Detail
{String} CssBadFormat
CSS class for date bad format.

{HTMLInputElement} dateDayField
HTML day date field object.

{HTMLInputElement} dateMonthField
HTML month date field object.

{HTMLInputElement} dateYearField
HTML year date field object.

{HTMLInputElement} hiddenDateField
HTML hidden date field object.

{HTMLInputElement} singleDateField
Single date field HTML object.
Method Detail
acceptDate(dateField)
This function checks the date on input type field(s). If it's correct, date is set on the Calendar, if not, an error class is applied on input type field(s).
Parameters:
dateField

addExplodedDateField(yearFieldId, monthFieldId, dayFieldId)
Set the 3 input HTML text fields (day, month and year) synchronized with the calendar.
Parameters:
{HTMLInputElement} yearFieldId
HTML year input text field.
{HTMLInputElement} monthFieldId
HTML month input text field.
{HTMLInputElement} dayFieldId
HTML day input text field.

addHiddenDateField(hiddenDateFieldId)
Set the input HTML hidden field on calendar in order to update selected date(s).
Parameters:
{HTMLInputElement} hiddenDateFieldId
HTML input hidden field.

addSingleDateField(singleDateFieldId)
Set the input HTML text field synchronized with the calendar.
Parameters:
{HTMLInputElement} singleDateFieldId
HTML input text field.

<private> checkCalendarDate((Date))
This fonction throw an exception if the range is not valid to be sure that the date is well formatted
Parameters:
(Date)
the calendar date to check

clearBadFormat()
Clear all bad format CSS style class on input type.

deactivate()
Desactivate the calendar.

doSelectCell(e, cal)
Parameters:
e
The event
cal
A reference to the calendar passed by the Event utility

emptyDatefields()
Empty dates HTML input text fields (single field and 3 parts fields).

fillDateInfields()
Fill dates HTML input text fields (single field, 3 parts fields and hidden fields).

{String} getErrorMessage(the, a)
This function return the error message depending on the exception
Parameters:
{Exception} the
exception thrown
{Date/Date[]} a
date representing the selection
Returns:
{String} the error message

getParsedCalendarDate((String))
This fonction return a parsed date If it's correct, the parsed date is returned, if not, an error class is returned
Parameters:
(String)
a String representing a date
Returns:
(Date) a parsed Date

{Array} getSelDates()
Returns selected date(s).
Returns:
2-dim arrays : [ [ year, month, day ], [...] ]

handleError(The)
This function handle a date error
Parameters:
{String} The
error message

handleEvent(evt)
This is an overridden function from RiaComponent. It's called to catch event.
Parameters:
{RiaEvent} evt
RiaEvent object

handleInputEvent()
Handle keydown on input fields.
Parameters:
{Event} event.

isCalendarVisible()
This fonction return a boolean component if calendar is visible,
Returns:
(Boolean) true if : - there's a parent with no tooltip; - there's a parent with a tooltip opened, - there's no tooltip - there's a tooltip opened) false in others cases

{boolean} isOutOfRangeDate(New)
This function check if date is out of the range or not
Parameters:
{Date} New
date to check is out of the range
Returns:
True if date is out of the range or false instead.

{boolean} isRestrictedDate(New)
This function check if date is a restricted date (= not selectionable) or not.
Parameters:
{Date} New
date to check if restricted.
Returns:
True if date is a restricted date (not selectable) or false instead.

{boolean} isSelectedDateValid()
Is the date from input field valid ?
Returns:
true if date is valid, false instead.

onSelectDate(date)
Selects a cell corresponding to the date in parameter To be overridden
Parameters:
{Date} date
the date to select

{boolean} resetCalendar()
Clean the date selected, clean HTML date input text fields and desactivate the calendar.
Returns:
True if the reset has been performed, false otherwise

setNewDate(the)
This function set the new date on calendar. If the date is on the same calendar, no render is made to optimize display.
Parameters:
{Date} the
new date to set.

setNewDateAndFillDateInFields(the)
This function set the new date on calendar and fills html inputs fields.
Parameters:
{Date} the
new date to set.

setSingleValue(a)
This function set a new date value from a date If it's correct, date is set on the Calendar, if not, an error class is returned
Parameters:
{Date} a
date representing the selection

setValue(a)
This function set a new date value from a date If it's correct, date is set on the Calendar, if not, an error class is returned
Parameters:
{Date/Date[]} a
date representing the selection

wireCustomEvents()
Yahoo method override.

Documentation generated by JsDoc Toolkit 2.0.0 on Thu May 05 2011 12:20:32 GMT+0200 (CEST)