@microsoft/fast-foundation > Calendar
Calendar class
Calendar component
- The default slot for calendar content
dateselected - Fires a custom 'dateselected' event when Enter is invoked via keyboard on a date
Signature:export declare class Calendar extends FoundationElement
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
dateFormatter | DateFormatter | date formatter utitlity for getting localized strings | |
dayFormat | DayFormat | Format style for the day | |
disabledDates | string | A list of dates that should be shown as disabled | |
locale | string | String repesentation of the full locale including market, calendar type and numbering system | |
minWeeks | number | Minimum number of weeks to show for the month This can be used to normalize the calendar view when changing or across multiple calendars | |
month | number | Month to display | |
monthFormat | MonthFormat | Format style for the month label | |
readonly | boolean | Readonly attribute for turning off data-grid | |
selectedDates | string | A list of dates that should be shown as highlighted | |
weekdayFormat | WeekdayFormat | Format style for the week day labels | |
year | number | Year of the month to display | |
yearFormat | YearFormat | Format style for the year used in the title |
Methods
Method | Modifiers | Description |
---|---|---|
dateInString(date, datesString) | A helper function that checks if a date exists in a list of dates | |
getDayClassNames(date, todayString) | Creates a class string for the day container | |
getDays(info, minWeeks) | A list of calendar days | |
getMonthInfo(month, year) | Gets data needed to render about a calendar month as well as the previous and next months | |
getWeekdayText() | Returns a list of weekday labels | |
handleDateSelect(event, day) | Emits the "date-select" event with the day, month and year. | |
handleKeydown(event, date) | Handles keyboard events on a cell |