calendar.js

Summary
calendar.js
Calendar
ngCalendarThis class implements a generic calendar control.
Properties
CurrentDate...
WeekStartDay...
HiliteWeekDays...
DateFormat...
ImgWeekDay...
ImgDay...
ImgNow...
PrevMonBtn...
NextMonBtn...
PrevYearBtn...
NextYearBtn...
TodayBtn...
TomorrowBtn...
NextWeekBtn...
FastButtons...
Navigation...
YearNavigation...
FastNavigation...
DisplayedDates...
SelectedDates...
SelectType...
SelectFrom...
SelectTo...
BlockedDates...
BlockedWeekDays...
MinDate...
MaxDate...
Frame...
Methods
FormatDateFormats date to string.
ParseDateParses date from string.
NextMonthMoves calendar page to next month.
PrevMonthMoves calendar page to previous month.
NextYearMoves calendar page to next year.
PrevYearMoves calendar page to previous year.
ClearSelectedClears selected dates.
SelectDateAdds/removes date to/from selection/
GetSelectedGets selected dates as indexed array.
SetSelectedSets selected dates from array.
IsDayEnabledDetermines if specified date is available for selection.
BeginUpdatePrevents the updating of the calendar until the EndUpdate method is called.
EndUpdatePerforms the repaints deferred by a call to BeginUpdate.
UpdateCalendarRepaints the calendar page.
Events
OnFormatDate
OnParseDate
OnDayClick
OnIsDayEnabled
OnSelectChanged
OnGetWeekDayImg
OnGetWeekDayText
OnGetWeekDayAlt
OnGetDayImg
OnGetDayText
OnGetDayAlt
OnMouseEnter
OnMouseLeave
ngEditDateStandard edit date control (based on ngEdit).
Properties
DateFormat...
Methods
FormatDateFormats date to string.
ParseDateParses date from string.
GetDateGets edited date.
SetDateSets edited date.
Events
OnFormatDate
OnParseDate
ngEditTimeStandard edit date control (based on ngEdit).
Properties
TimeFormat...
Methods
FormatTimeFormats date to string.
ParseTimeParses date from string.
GetDateGets edited date.
SetDateSets edited date.
Events
OnFormatDate
OnParseDate

Calendar

ngCalendar

This class implements a generic calendar control.

Syntax

new ngCalendar ([string id])

Parameters

idparent element

See also

Abstract class ngControl.

Summary
Properties
CurrentDate...
WeekStartDay...
HiliteWeekDays...
DateFormat...
ImgWeekDay...
ImgDay...
ImgNow...
PrevMonBtn...
NextMonBtn...
PrevYearBtn...
NextYearBtn...
TodayBtn...
TomorrowBtn...
NextWeekBtn...
FastButtons...
Navigation...
YearNavigation...
FastNavigation...
DisplayedDates...
SelectedDates...
SelectType...
SelectFrom...
SelectTo...
BlockedDates...
BlockedWeekDays...
MinDate...
MaxDate...
Frame...
Methods
FormatDateFormats date to string.
ParseDateParses date from string.
NextMonthMoves calendar page to next month.
PrevMonthMoves calendar page to previous month.
NextYearMoves calendar page to next year.
PrevYearMoves calendar page to previous year.
ClearSelectedClears selected dates.
SelectDateAdds/removes date to/from selection/
GetSelectedGets selected dates as indexed array.
SetSelectedSets selected dates from array.
IsDayEnabledDetermines if specified date is available for selection.
BeginUpdatePrevents the updating of the calendar until the EndUpdate method is called.
EndUpdatePerforms the repaints deferred by a call to BeginUpdate.
UpdateCalendarRepaints the calendar page.
Events
OnFormatDate
OnParseDate
OnDayClick
OnIsDayEnabled
OnSelectChanged
OnGetWeekDayImg
OnGetWeekDayText
OnGetWeekDayAlt
OnGetDayImg
OnGetDayText
OnGetDayAlt
OnMouseEnter
OnMouseLeave

Properties

CurrentDate

this.CurrentDate

...  Type: date Default value: new Date()

WeekStartDay

this.WeekStartDay

...  Type: int Default value: 1

HiliteWeekDays

this.HiliteWeekDays

...  Type: array Default value: {0:true}

DateFormat

this.DateFormat

...  Type: string

ImgWeekDay

this.ImgWeekDay

...  Type: object

ImgDay

this.ImgDay

...  Type: object

ImgNow

this.ImgNow

...  Type: object

PrevMonBtn

this.PrevMonBtn

...  Type: object

NextMonBtn

this.NextMonBtn

...  Type: object

PrevYearBtn

this.PrevYearBtn

...  Type: object

NextYearBtn

this.NextYearBtn

...  Type: object

TodayBtn

this.TodayBtn

...  Type: object

TomorrowBtn

this.TomorrowBtn

...  Type: object

NextWeekBtn

this.NextWeekBtn

...  Type: object

FastButtons

this.FastButtons

...  Type: array Default value: new Array(this.TodayBtn, this.TomorrowBtn, this.NextWeekBtn)

Navigation

this.Navigation

...  Type: bool Default value: true

YearNavigation

this.YearNavigation

...  Type: bool Default value: false

FastNavigation

this.FastNavigation

...  Type: bool Default value: true

DisplayedDates

this.DisplayedDates

...  Type: array Default value: {}

SelectedDates

this.SelectedDates

...  Type: array Default value: {}

SelectType

this.SelectType

...  Type: enum

Constants

ngcalSelectNone...
ngcalSelectSingle...
ngcalSelectMulti...
ngcalSelectMultiExt...
ngcalSelectRange...

Default value: ngcalSelectSingle

SelectFrom

this.SelectFrom

...  Type: date Default value: new Date()

SelectTo

this.SelectTo

...  Type: date Default value: new Date()

BlockedDates

this.BlockedDates

...  Type: array Default value: {}

BlockedWeekDays

this.BlockedWeekDays

...  Type: array Default value: {}

MinDate

this.MinDate

...  Type: date Default value: null

MaxDate

this.MaxDate

...  Type: date Default value: null

Frame

this.Frame

...  Type: object

Methods

FormatDate

Formats date to string.

Syntax

string FormatDate (date d)

Parameters

Returns

-

See also

Format strings in ng_FormatDateTime.

ParseDate

Parses date from string.

Syntax

date ParseDate (string s)

Parameters

Returns

-

See also

Format strings in ng_FormatDateTime.

NextMonth

Moves calendar page to next month.

Syntax

void NextMonth ([bool changeyear = true])

Parameters

Returns

-

PrevMonth

Moves calendar page to previous month.

Syntax

void PrevMonth ([bool changeyear = true])

Parameters

Returns

-

NextYear

Moves calendar page to next year.

Syntax

void NextYear ()

Parameters

Returns

-

PrevYear

Moves calendar page to previous year.

Syntax

void PrevYear ()

Parameters

Returns

-

ClearSelected

Clears selected dates.

Syntax

void ClearSelected ()

Parameters

Returns

-

SelectDate

Adds/removes date to/from selection/

Syntax

void SelectDate (date d, bool state, bool ctrlkey)

Parameters

Returns

-

GetSelected

Gets selected dates as indexed array.

Syntax

array GetSelected ()

Parameters

Returns

-

SetSelected

Sets selected dates from array.  Items can be a date types or string types.

Syntax

void SetSelected (array dates)

Parameters

Returns

-

IsDayEnabled

Determines if specified date is available for selection.

Syntax

bool IsDayEnabled (date d)

Parameters

Returns

-

BeginUpdate

Prevents the updating of the calendar until the EndUpdate method is called.

Syntax

void BeginUpdate ()

Parameters

Returns

-

See also

EndUpdate

EndUpdate

Performs the repaints deferred by a call to BeginUpdate.

Syntax

void EndUpdate ()

Parameters

Returns

-

See also

BeginUpdate

UpdateCalendar

Repaints the calendar page.  Faster then updating whole control by calling Update() method.

Syntax

void UpdateCalendar ()

Parameters

Returns

-

Events

OnFormatDate

OnParseDate

OnDayClick

OnIsDayEnabled

OnSelectChanged

OnGetWeekDayImg

OnGetWeekDayText

OnGetWeekDayAlt

OnGetDayImg

OnGetDayText

OnGetDayAlt

OnMouseEnter

OnMouseLeave

ngEditDate

Standard edit date control (based on ngEdit).

Summary
Properties
DateFormat...
Methods
FormatDateFormats date to string.
ParseDateParses date from string.
GetDateGets edited date.
SetDateSets edited date.
Events
OnFormatDate
OnParseDate

Properties

DateFormat

c.DateFormat

...  Type: string

Methods

FormatDate

c.FormatDate = function(d)

Formats date to string.

Syntax

string FormatDate (date d)

Parameters

Returns

-

ParseDate

c.ParseDate = function(d)

Parses date from string.

Syntax

date ParseDate (string s)

Parameters

Returns

-

GetDate

c.GetDate = function()

Gets edited date.

Syntax

date GetDate ()

Parameters

Returns

-

SetDate

c.SetDate = function(d)

Sets edited date.

Syntax

void SetDate (date d)

Parameters

Returns

-

Events

OnFormatDate

OnParseDate

ngEditTime

Standard edit date control (based on ngEdit).

Summary
Properties
TimeFormat...
Methods
FormatTimeFormats date to string.
ParseTimeParses date from string.
GetDateGets edited date.
SetDateSets edited date.
Events
OnFormatDate
OnParseDate

Properties

TimeFormat

c.TimeFormat

...  Type: string

Methods

FormatTime

c.FormatTime = function(d)

Formats date to string.

Syntax

string FormatTime (date d)

Parameters

Returns

-

ParseTime

c.ParseTime = function(d)

Parses date from string.

Syntax

date *ParseTime (string s)

Parameters

Returns

-

GetDate

c.GetDate = function()

Gets edited date.

Syntax

date GetDate ()

Parameters

Returns

-

SetDate

c.SetDate = function(d)

Sets edited date.

Syntax

void SetDate (date d)

Parameters

Returns

-

Events

OnFormatDate

OnParseDate

this.CurrentDate
...
this.WeekStartDay
...
this.HiliteWeekDays
...
this.DateFormat
...
this.ImgWeekDay
...
this.ImgDay
...
this.ImgNow
...
this.PrevMonBtn
...
this.NextMonBtn
...
this.PrevYearBtn
...
this.NextYearBtn
...
this.TodayBtn
...
this.TomorrowBtn
...
this.NextWeekBtn
...
this.FastButtons
...
this.Navigation
...
this.YearNavigation
...
this.FastNavigation
...
this.DisplayedDates
...
this.SelectedDates
...
this.SelectType
...
this.SelectFrom
...
this.SelectTo
...
this.BlockedDates
...
this.BlockedWeekDays
...
this.MinDate
...
this.MaxDate
...
this.Frame
...
Performs the repaints deferred by a call to BeginUpdate.
Prevents the updating of the calendar until the EndUpdate method is called.
This class implements a generic edit control.
c.DateFormat
...
c.FormatDate = function(d)
Formats date to string.
c.ParseDate = function(d)
Parses date from string.
c.GetDate = function()
Gets edited date.
c.SetDate = function(d)
Sets edited date.
c.TimeFormat
...
c.FormatTime = function(d)
Formats date to string.
c.ParseTime = function(d)
Parses date from string.
c.GetDate = function()
Gets edited date.
c.SetDate = function(d)
Sets edited date.
Extensions of ngControl definition.
function ng_FormatDateTime(date,
format,
def)
Formats date and time to string.
Close