@@ -16,12 +16,12 @@ When data is in the form of dates, such as schedules, timetables, prices calenda
1616import { NzCalendarModule } from ' ng-zorro-antd/calendar' ;
1717```
1818
19-
2019## API
2120
2221** Note:** Some of Calendar's locale are coming from [ Angular i18n] ( https://angular.io/guide/i18n ) , that should be provided in the file of ` app.module.ts ` .
2322
2423For example:
24+
2525``` typescript
2626import { registerLocaleData } from ' @angular/common' ;
2727import en from ' @angular/common/locales/en' ;
@@ -34,25 +34,26 @@ registerLocaleData(en);
3434 [(ngModel)] =" selectedDate"
3535 [(nzMode)] =" mode"
3636 (nzPanelChange) =" panelChange($event)"
37- (nzSelectChange) =" selectChange($event)" >
37+ (nzSelectChange) =" selectChange($event)"
38+ >
3839 <!-- Another method for cell definition -->
3940 <div *nzDateCell >Foo</div >
4041</nz-calendar >
4142<!-- Passing TemplateRef -->
4243<ng-template #dateCellTpl let-date ><span >{{ date | date:'d'}}</span ></ng-template >
4344```
4445
45- ### nz-calendar
46-
47- | Property | Description | Type | Default |
48- | -------- | ----------- | ---- | ------- |
49- | ` [(ngModel)] ` | (Two-way bindable) The current selected date | ` Date ` | current date |
50- | ` [(nzMode)] ` | The display mode of the calendar (two-way bindable) | ` 'month' \| 'year' ` | ` 'month' ` |
51- | ` [nzFullscreen] ` | Whether to display in full-screen | ` boolean ` | ` true ` |
52- | ` [nzDateCell] ` | (Contentable) Customize the display of the date cell, the template content will be appended to the cell | ` TemplateRef<Date> ` | - |
53- | ` [nzDateFullCell] ` | (Contentable) Customize the display of the date cell, the template content will override the cell | ` TemplateRef<Date> ` | - |
54- | ` [nzMonthCell] ` | (Contentable) Customize the display of the month cell, the template content will be appended to the cell | ` TemplateRef<Date> ` | - |
55- | ` [nzMonthFullCell] ` | (Contentable) Customize the display of the month cell, the template content will override the cell | ` TemplateRef<Date> ` | - |
56- | ` [nzDisabledDate] ` | specify the date that cannot be selected | ` (current: Date) => boolean ` | - | - |
57- | ` (nzPanelChange) ` | Callback for when panel changes | ` EventEmitter<{ date: Date, mode: 'month' \| 'year' }> ` | - |
58- | ` (nzSelectChange) ` | A callback function of selected item | ` EventEmitter<Date> ` | - |
46+ ### nz-calendar: standalone
47+
48+ | Property | Description | Type | Default |
49+ | ------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ----- ------- |
50+ | ` [(ngModel)] ` | (Two-way bindable) The current selected date | ` Date ` | current date |
51+ | ` [(nzMode)] ` | The display mode of the calendar (two-way bindable) | ` 'month' \| 'year' ` | ` 'month' ` |
52+ | ` [nzFullscreen] ` | Whether to display in full-screen | ` boolean ` | ` true ` |
53+ | ` [nzDateCell] ` | (Contentable) Customize the display of the date cell, the template content will be appended to the cell | ` TemplateRef<Date> ` | - |
54+ | ` [nzDateFullCell] ` | (Contentable) Customize the display of the date cell, the template content will override the cell | ` TemplateRef<Date> ` | - |
55+ | ` [nzMonthCell] ` | (Contentable) Customize the display of the month cell, the template content will be appended to the cell | ` TemplateRef<Date> ` | - |
56+ | ` [nzMonthFullCell] ` | (Contentable) Customize the display of the month cell, the template content will override the cell | ` TemplateRef<Date> ` | - |
57+ | ` [nzDisabledDate] ` | specify the date that cannot be selected | ` (current: Date) => boolean ` | - |
58+ | ` (nzPanelChange) ` | Callback for when panel changes | ` EventEmitter<{ date: Date, mode: 'month' \| 'year' }> ` | - |
59+ | ` (nzSelectChange) ` | A callback function of selected item | ` EventEmitter<Date> ` | - |
0 commit comments