Class Index | File Index

Classes


Class JSCalender.InlineCalender

Represents a InlineCalender.
Defined in: calendar.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
JSCalender.InlineCalender(targetId, onClickElementId, top)
Construct a new InlineCalender.
Field Summary
Field Attributes Field Name and Description
 
The id of calender's container
 
The config of calender
 
The first day in week
 
id
The id of calender's parent node
 
The left of calender
 
This month
 
The days' number in month
 
The resource of calender
 
Today
 
top
The top of calender
 
This year
Method Summary
Method Attributes Method Name and Description
<private>  
Add event to calendar.
<private>  
_addClass(el, className)
Add css class to element.
<private>  
Add event to window.document.
<private>  
Add event to month combobox
<private>  
Add event to year combobox
<private>  
Check data to decide that whether show the slide panel
<private>  
_clickCheck(event)
Hide calendar or combobox when clicked
<private>  
Create calendar's body panel.
<private>  
Create calendar's bottom panel.
<private>  
Create calendar's container.
<private>  
Create calendar's dates in body panel.
<private>  
Create calendar's days in body panel.
<private>  
Create calendar's info panel.
<private>  
Create calendar's panel.
<private>  
Create calendar's slide panel.
<private>  
Create calendar's top panel.
<private>  
Create month combobox.
<private>  
Create year combobox.
<private>  
Fresh calendar
<private>  
_getDateString(year, month, date)
Convert Date to string
<private>  
Get the number of dates by month.
<private>  
Get the number of selected dates
<private>  
Get the index of year's week by date.
<private>  
_inDateRange(dataString)
Judge the date is in date range or not.
<private>  
Initialize calendar.
<private>  
_keyEvent(event)
Process key event when press keyboard
<private>  
Get next month's calendar
<private>  
Get next year's calendar
<private>  
_parseDate(step)
Fresh calendar when press keyboard
<private>  
Get last month's calendar
<private>  
Get last year's calendar
<private>  
_print(dateString)
Output the selected date
<private>  
_removeClass(el, className)
Remove css class of element.
<private>  
_showSlidePanel(img, text, dateString)
Show slide panel
 
setConfig(config)
Set the config of calendar
 
setCss(css)
Set the css of calendar
 
Set the first day in week
 
Set the language of calendar
 
setSlideDate(date, image, text)
Set the export format
 
show()
Show calendar.
Class Detail
JSCalender.InlineCalender(targetId, onClickElementId, top)
Construct a new InlineCalender.
var myCalender = new JSCalender.InlineCalender("containerId");
Parameters:
{String} targetId
The id of the Calender's input element.
{String} onClickElementId
The id of the Calender's input element.
top
Returns:
A new instance of a Calender.
Field Detail
{String} calendarContainerId
The id of calender's container
Default Value:
"fogtower-calendar-calendarcontainer"

{Object} config
The config of calender

{Number} firstDayInWeek
The first day in week
this.firstDayInWeek = 0;
The first day in week is Monday.
this.firstDayInWeek = 6;
The first day in week is Sunday.

{String} id
The id of calender's parent node

{Number} left
The left of calender

{Number} month
This month

{Array} monthDate
The days' number in month

{Object} resource
The resource of calender

{Date} thisDay
Today

{Number} top
The top of calender

{Number} year
This year
Method Detail
<private> _addCalendarEvent()
Add event to calendar.

<private> _addClass(el, className)
Add css class to element.
Parameters:
{Object} el
The element where adds class.
{String} className
The css class which to be added..

<private> _addDocumentEvent()
Add event to window.document.

<private> _addMonthComboboxEvent()
Add event to month combobox

<private> _addYearComboboxEvent()
Add event to year combobox

<private> _checkSlidePanel(date)
Check data to decide that whether show the slide panel
Parameters:
{String} date
The date.

<private> _clickCheck(event)
Hide calendar or combobox when clicked
Parameters:
event

<private> {String} _createCalendarBody()
Create calendar's body panel.
Returns:
{String} Create body panel of calendar.

<private> {String} _createCalendarBottom()
Create calendar's bottom panel.
Returns:
{String} Create bottom panel of calendar.

<private> _createCalendarContainer()
Create calendar's container.

<private> {String} _createCalendarDates()
Create calendar's dates in body panel.
Returns:
{String} Create dates in body panel of calendar.

<private> {String} _createCalendarDays()
Create calendar's days in body panel.
Returns:
{String} Create days in body panel of calendar.

<private> {String} _createCalendarInfoPanel()
Create calendar's info panel.
Returns:
{String} Create info panel of calendar.

<private> {String} _createCalendarPanel()
Create calendar's panel.
Returns:
{String} Create panel of calendar.

<private> {String} _createCalendarSlide()
Create calendar's slide panel.
Returns:
{String} Create slide panel of calendar.

<private> {String} _createCalendarTop()
Create calendar's top panel.
Returns:
{String} Create top panel of calendar.

<private> {String} _createMonthCombobox()
Create month combobox.
Returns:
{String} Create month combobox of calendar.

<private> {String} _createYearCombobox(year)
Create year combobox.
Parameters:
year
Returns:
{String} Create year combobox of calendar.

<private> _freshDaysPanel()
Fresh calendar

<private> _getDateString(year, month, date)
Convert Date to string
Parameters:
{Number} year
The year.
{Number} month
The month.
{Date} date
The date.

<private> _getMonthDate(month)
Get the number of dates by month.
Parameters:
{Number} month
The month.
Returns:
The number of dates.

<private> {Number} _getSelectedDatesNumber()
Get the number of selected dates
Returns:
{Number} The number of selected dates

<private> _getYearWeek(date)
Get the index of year's week by date.
Parameters:
{Date} date
The date.
Returns:
The index of week.

<private> {Boolean} _inDateRange(dataString)
Judge the date is in date range or not.
Parameters:
{String} dataString
The date which to be judged.
Returns:
{Boolean} in date range or not.

<private> _initialize()
Initialize calendar.

<private> _keyEvent(event)
Process key event when press keyboard
Parameters:
{Object} event
The event which comes from pressing keyboard.

<private> _nextMonth()
Get next month's calendar

<private> _nextYear()
Get next year's calendar

<private> _parseDate(step)
Fresh calendar when press keyboard
Parameters:
{Number} step
The diff which compares with the selected date.

<private> _preMonth()
Get last month's calendar

<private> _preYear()
Get last year's calendar

<private> _print(dateString)
Output the selected date
Parameters:
{String} dateString
The format of outputed date

<private> _removeClass(el, className)
Remove css class of element.
Parameters:
{Object} el
The element where removes class.
{String} className
The css class which to be removed.

<private> _showSlidePanel(img, text, dateString)
Show slide panel
Parameters:
img
text
dateString

setConfig(config)
Set the config of calendar
Parameters:
{String} config
The config which to be set

setCss(css)
Set the css of calendar
Parameters:
{String} css
The css which to be set

setFirstDayInWeek(day)
Set the first day in week
Parameters:
{Number} day
The day which to be set

setLanguage(lang)
Set the language of calendar
Parameters:
{String} lang
The language which to be set

setSlideDate(date, image, text)
Set the export format
Parameters:
{String} date
The date which to be set
{String} image
The image which to be show in slide panel
{String} text
The text which to be show in slide panel

show()
Show calendar.

Documentation generated by JsDoc Toolkit 2.3.0 on Sat Oct 31 2009 11:37:31 GMT+0800 (CST)