@@ -16,12 +16,12 @@ When data is in the form of dates, such as schedules, timetables, prices calenda
16
16
import { NzCalendarModule } from ' ng-zorro-antd/calendar' ;
17
17
```
18
18
19
-
20
19
## API
21
20
22
21
** 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 ` .
23
22
24
23
For example:
24
+
25
25
``` typescript
26
26
import { registerLocaleData } from ' @angular/common' ;
27
27
import en from ' @angular/common/locales/en' ;
@@ -34,25 +34,26 @@ registerLocaleData(en);
34
34
[(ngModel)] =" selectedDate"
35
35
[(nzMode)] =" mode"
36
36
(nzPanelChange) =" panelChange($event)"
37
- (nzSelectChange) =" selectChange($event)" >
37
+ (nzSelectChange) =" selectChange($event)"
38
+ >
38
39
<!-- Another method for cell definition -->
39
40
<div *nzDateCell >Foo</div >
40
41
</nz-calendar >
41
42
<!-- Passing TemplateRef -->
42
43
<ng-template #dateCellTpl let-date ><span >{{ date | date:'d'}}</span ></ng-template >
43
44
```
44
45
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