Skip to content

Commit

Permalink
fix(module:calendar): fix month/year view switched (NG-ZORRO#768)
Browse files Browse the repository at this point in the history
  • Loading branch information
chunghha authored and wilsoncook committed Dec 30, 2017
1 parent d31c596 commit 383a0f4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/calendar/nz-calendar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export interface WeekInterface {
<nz-select
class="ant-fullcalendar-month-select"
style="width: 70px;"
*ngIf="nzMode == 'year'"
*ngIf="nzMode == 'month'"
[ngModel]="_showMonth"
(ngModelChange)="_showMonth = $event;_buildCalendar()">
<nz-option
Expand All @@ -77,10 +77,10 @@ export interface WeekInterface {
</nz-option>
</nz-select>
<nz-radio-group [(ngModel)]="nzMode">
<label nz-radio-button [nzValue]="'year'">
<span>{{ _yearUnit }}</span>
</label><label nz-radio-button [nzValue]="'month'">
<span>{{ _monthUnit }}</span>
<label nz-radio-button [nzValue]="'month'">
<span>{{ _monthUnit }}</span>
</label><label nz-radio-button [nzValue]="'year'">
<span>{{ _yearUnit }}</span>
</label>
</nz-radio-group>
</div>
Expand All @@ -97,7 +97,7 @@ export interface WeekInterface {
[class.ant-fullcalendar-table]="!nzDatePicker"
[class.ant-calendar-table]="nzDatePicker"
[class.ant-patch-full-height]="nzDatePicker"
*ngIf="nzMode == 'year'">
*ngIf="nzMode == 'month'">
<thead>
<tr>
<th
Expand Down Expand Up @@ -155,7 +155,7 @@ export interface WeekInterface {
<table
[class.ant-fullcalendar-month-panel-table]="!nzDatePicker"
[class.ant-calendar-month-panel-table]="nzDatePicker"
*ngIf="nzMode == 'month'">
*ngIf="nzMode == 'year'">
<tbody class="ant-fullcalendar-month-panel-tbody">
<tr *ngFor="let quarter of _quartersCalendar">
<ng-template [ngIf]="!nzDatePicker">
Expand Down Expand Up @@ -225,7 +225,7 @@ export class NzCalendarComponent implements OnInit {
@Output() nzClickDay: EventEmitter<DayInterface> = new EventEmitter();
@Output() nzClickMonth: EventEmitter<MonthInterface> = new EventEmitter();
@Input() nzClearTime = true;
@Input() nzMode = 'year';
@Input() nzMode = 'month';

@Input()
set nzFullScreen(value: boolean) {
Expand Down

0 comments on commit 383a0f4

Please sign in to comment.