Skip to main content

BootstrapCalendar Class

#Declaration

TypeScript
class BootstrapCalendar extends BootstrapClientEdit

#Remarks

IMPORTANT

Bootstrap Controls for ASP.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

#Inheritance

#Methods

#clearSelection Method

Deselects all the selected dates within the calendar.

#Declaration

TypeScript
clearSelection(): void

#deselectDate(date) Method

Deselects the specified date within the calendar.

#Declaration

TypeScript
deselectDate(
    date: Date
): void

#Parameters

Name Type
date Date

#deselectRange(start, end) Method

Deselects the specified range of dates within the calendar.

#Declaration

TypeScript
deselectRange(
    start: Date,
    end: Date
): void

#Parameters

Name Type
start Date
end Date

#getEnabled Method

#Declaration

TypeScript
getEnabled(): boolean

#Returns

Type
boolean

#getMaxDate Method

Gets the maximum date on the calendar.

#Declaration

TypeScript
getMaxDate(): Date

#Returns

Type
Date

#getMinDate Method

Gets the minimum date on the calendar.

#Declaration

TypeScript
getMinDate(): Date

#Returns

Type
Date

#getSelectedDate Method

Returns the calendar’s selected date.

#Declaration

TypeScript
getSelectedDate(): Date

#Returns

Type
Date

#getSelectedDates Method

Returns a list of dates which are selected within the calendar.

#Declaration

TypeScript
getSelectedDates(): Date[]

#Returns

Type
Date[]

#getVisibleDate Method

Gets the date that determines the month and year that are currently displayed in the calendar.

#Declaration

TypeScript
getVisibleDate(): Date

#Returns

Type
Date

#isDateSelected(date) Method

Tests whether the specified date is selected.

#Declaration

TypeScript
isDateSelected(
    date: Date
): boolean

#Parameters

Name Type
date Date

#Returns

Type
boolean

#off<K> Method

#Declaration

TypeScript
off<K extends keyof BootstrapCalendarEventMap>(
    eventName?: K,
    callback?: (this: BootstrapCalendar,
    args?: BootstrapCalendarEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapCalendar, args?: BootstrapCalendarEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#on<K>(eventName, callback) Method

#Declaration

TypeScript
on<K extends keyof BootstrapCalendarEventMap>(
    eventName: K,
    callback: (this: BootstrapCalendar,
    args?: BootstrapCalendarEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapCalendar, args?: BootstrapCalendarEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#once<K>(eventName, callback) Method

#Declaration

TypeScript
once<K extends keyof BootstrapCalendarEventMap>(
    eventName: K,
    callback: (this: BootstrapCalendar,
    args?: BootstrapCalendarEventMap[K]) => void
): this

#Parameters

Name Type
eventName K
callback (this: BootstrapCalendar, args?: BootstrapCalendarEventMap[K]) => void

#Type Parameters

Name Type
K keyof

#Returns

Type
this

#selectDate(date) Method

Selects the specified date within the calendar.

#Declaration

TypeScript
selectDate(
    date: Date
): void

#Parameters

Name Type
date Date

#selectRange(start, end) Method

Selects the specified range of dates within the calendar.

#Declaration

TypeScript
selectRange(
    start: Date,
    end: Date
): void

#Parameters

Name Type
start Date
end Date

#setEnabled(enabled) Method

#Declaration

TypeScript
setEnabled(
    enabled: boolean
): void

#Parameters

Name Type
enabled boolean

#setMaxDate(date) Method

Sets the maximum date of the calendar.

#Declaration

TypeScript
setMaxDate(
    date: Date
): void

#Parameters

Name Type
date Date

#setMinDate(date) Method

Sets the minimum date of the calendar.

#Declaration

TypeScript
setMinDate(
    date: Date
): void

#Parameters

Name Type
date Date

#setSelectedDate(date) Method

Sets the calendar’s selected date.

#Declaration

TypeScript
setSelectedDate(
    date: Date
): void

#Parameters

Name Type
date Date

#setVisibleDate(date) Method

Sets the date that specifies the month and year to be displayed in the calendar.

#Declaration

TypeScript
setVisibleDate(
    date: Date
): void

#Parameters

Name Type
date Date