import {MatDatepickerModule} from '@angular/material/datepicker';
MatDatepickerIntl
Datepicker data that requires internationalization.
Name | Description |
---|---|
| A label for the calendar popup (used by screen readers). |
| Stream that emits whenever the labels here are changed. Use this to notify components if the labels have changed after initialization. |
| A label for the next month button (used by screen readers). |
| A label for the next multi-year button (used by screen readers). |
| A label for the next year button (used by screen readers). |
| A label for the button used to open the calendar popup (used by screen readers). |
| A label for the previous month button (used by screen readers). |
| A label for the previous multi-year button (used by screen readers). |
| A label for the previous year button (used by screen readers). |
| A label for the 'switch to month view' button (used by screen readers). |
| A label for the 'switch to year view' button (used by screen readers). |
MatCalendarHeader
Default header for MatCalendar
Selector: mat-calendar-header
Exported as: matCalendarHeaderName | Description |
---|---|
| |
| The label for the the next button. |
| |
| The label for the current calendar view. |
| The label for the the previous button. |
currentPeriodClicked | |
---|---|
Handles user clicks on the period label. |
nextClicked | |
---|---|
Handles user clicks on the next button. |
nextEnabled | |
---|---|
Whether the next period button is enabled. | |
Returns | |
boolean |
previousClicked | |
---|---|
Handles user clicks on the previous button. |
previousEnabled | |
---|---|
Whether the previous period button is enabled. | |
Returns | |
boolean |
MatDatepicker
Component responsible for managing the datepicker popup/dialog.
Selector: mat-datepicker
Exported as: matDatepickerName | Description |
---|---|
@Input()
| An input indicating the type of the custom header component for the calendar, if set. |
@Input()
| Color palette to use on the datepicker's calendar. |
@Input()
| Whether the datepicker pop-up should be disabled. |
@Input()
| Whether the calendar is open. |
@Input()
| Classes to be passed to the date picker panel. Supports the same syntax as |
@Input()
| The date to open the calendar to initially. |
@Input()
| The view that the calendar should start in. |
@Input()
| Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather than a popup and elements have more padding to allow for bigger touch targets. |
@Output('closed')
| Emits when the datepicker has been closed. |
@Output()
| Emits selected month in year view. This doesn't imply a change on the selected date. |
@Output('opened')
| Emits when the datepicker has been opened. |
@Output()
| Emits selected year in multiyear view. This doesn't imply a change on the selected date. |
| The id for the datepicker calendar. |
close | |
---|---|
Close the calendar. |
open | |
---|---|
Open the calendar. |
MatDatepickerInput
Directive used to connect an input to a MatDatepicker.
Selector: input[matDatepicker]
Exported as: matDatepickerInputName | Description |
---|---|
@Input()
| Whether the datepicker-input is disabled. |
@Input()
| The datepicker that this input is associated with. |
@Input()
| Function that can be used to filter out dates within the datepicker. |
@Input()
| The maximum valid date. |
@Input()
| The minimum valid date. |
@Input()
| The value of the input. |
@Output()
| Emits when a |
@Output()
| Emits when an |
getConnectedOverlayOrigin | |
---|---|
Gets the element that the datepicker popup should be connected to. | |
Returns | |
ElementRef | The element to connect the popup to. |
Deprecated getPopupConnectionElementRef | |
---|---|
Returns | |
ElementRef |
MatDatepickerToggleIcon
Can be used to override the icon of a matDatepickerToggle
.
Selector: [matDatepickerToggleIcon]
MatDatepickerToggle
Selector: mat-datepicker-toggle
Exported as: matDatepickerToggleName | Description |
---|---|
@Input('for')
| Datepicker instance that the button will toggle. |
@Input()
| Whether the toggle button is disabled. |
MatDatepickerInputEvent
An event used for datepicker input and change events. We don't always have access to a native input or change event because the event may have been triggered by the user clicking on the calendar popup. For consistency, we always use MatDatepickerInputEvent instead.
Name | Description |
---|---|
| Reference to the datepicker input component that emitted the event. |
| Reference to the native input element associated with the datepicker input. |
| The new value for the target datepicker input. |