ion-calendar
ion-calendar
is a simple calendar widget that allows users to
select pick single date or date ranges (weeks, months, years)
Notes
The ion-calendar
component fully support two-way binding of
ngModel
Usage
Basic Usage
<ion-calendar (change)="onPeriodChange($event)"></ion-calendar>
Usage within Forms
ion-calendar
supports [(ngModel)]
and ngControl
for use within
forms.
<form (submit)="onSubmit()">
<!-- other fields -->
<div>
<ion-calendar [(ngModel)]="datePeriod"></ion-calendar>
</div>
</form>
API Summary
Properties:
Name | Type | Description |
---|---|---|
selection-mode |
`"day" | "week" |
view-date |
Date | The initial date displayed. Default to current date |
view-mode |
`"month" | "year" |
start-of-week-day |
`"monday" | "tuesday" |
disabled |
boolean | Whether or not the button is disabled |