Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar - expose views as separate components + advanced KB navigation #3855

Merged
merged 42 commits into from
Feb 14, 2019
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
68b8fb7
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 16, 2019
795eaba
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 17, 2019
2b2caf1
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 17, 2019
2267bd2
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 18, 2019
dedd966
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 19, 2019
b21a16d
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 21, 2019
141df15
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 22, 2019
9d9bf6d
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 22, 2019
4dbbb51
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 23, 2019
8fbaaf0
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 24, 2019
ca14b1f
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular
SAndreeva Jan 26, 2019
c02327a
feat(month picker): initial refactoring of calendar views #3126
SAndreeva Jan 27, 2019
9b14056
fix(*): failing test #3126
SAndreeva Feb 7, 2019
c099138
Merge branch 'master' into SAndreeva/calendar-views-poc
SAndreeva Feb 7, 2019
b5d3199
fix(*): lint styling issue #3126
SAndreeva Feb 7, 2019
608ab7c
feat(month picker): bug fixing #3126
SAndreeva Feb 7, 2019
355d69b
Merge branch 'master' into SAndreeva/calendar-views-poc
SAndreeva Feb 7, 2019
e19ca0b
Merge branch 'SAndreeva/calendar-views-poc' of https://github.com/Ign…
SAndreeva Feb 7, 2019
c5f73a2
feat(month picker): fix build error #3126
SAndreeva Feb 8, 2019
41b9cab
feat(month picker): month picker POC #3126
SAndreeva Feb 8, 2019
dfe69f8
Merge branch 'master' into SAndreeva/calendar-views-poc
SAndreeva Feb 8, 2019
5fb077f
Merge branch 'SAndreeva/calendar-views-poc' of https://github.com/Ign…
SAndreeva Feb 8, 2019
62f7e89
Merge branch 'master' into SAndreeva/calendar-views-poc
SAndreeva Feb 11, 2019
a316523
feat(month picker): code improvements and clean up #3126
SAndreeva Feb 11, 2019
3d9f3f7
Merge branch 'SAndreeva/calendar-views-poc' of https://github.com/Ign…
SAndreeva Feb 11, 2019
7e4ef24
Merge branch 'master' into SAndreeva/calendar-views-poc
SAndreeva Feb 12, 2019
407f5ec
feat(month picker): add AKB navigation tests and update README.md #3126
SAndreeva Feb 11, 2019
e4fff2b
Merge branch 'SAndreeva/calendar-views-poc' of https://github.com/Ign…
SAndreeva Feb 12, 2019
58e24e3
Merge branch 'master' into SAndreeva/calendar-views-poc
SAndreeva Feb 12, 2019
46c5750
Merge branch 'master' into SAndreeva/calendar-views-poc
Feb 12, 2019
ac0a77d
Merge branch 'master' into SAndreeva/calendar-views-poc
SAndreeva Feb 13, 2019
0d080f4
feat(month picker): various bug fixes and enhancements #3126
SAndreeva Feb 12, 2019
59b0db5
Merge branch 'SAndreeva/calendar-views-poc' of https://github.com/Ign…
SAndreeva Feb 13, 2019
5ee9c87
Merge branch 'master' into SAndreeva/calendar-views-poc
SAndreeva Feb 13, 2019
40d65ba
feat(month picker): add KB to month picker component #3126
SAndreeva Feb 13, 2019
893e59d
Merge branch 'SAndreeva/calendar-views-poc' of https://github.com/Ign…
SAndreeva Feb 13, 2019
40df56c
Merge branch 'master' into SAndreeva/calendar-views-poc
Feb 13, 2019
1a5e56d
feat(month picker): address most of the review comments #3126
SAndreeva Feb 13, 2019
43b23ea
Merge branch 'SAndreeva/calendar-views-poc' of https://github.com/Ign…
SAndreeva Feb 13, 2019
13c645e
feat(month picker): add tests for the month picker #3126
SAndreeva Feb 13, 2019
ed99de2
Merge branch 'master' into SAndreeva/calendar-views-poc
kdinev Feb 14, 2019
e333cde
Merge branch 'master' into SAndreeva/calendar-views-poc
SAndreeva Feb 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 27 additions & 30 deletions projects/igniteui-angular/src/lib/calendar/calendar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
</ng-template>

<ng-template let-result #defaultMonth>
<span (click)="activeViewYear()" class="igx-calendar-picker__date">
<span tabindex="0" (keydown)="activeViewYearKB($event)" (click)="activeViewYear()" class="igx-calendar-picker__date">
{{ formattedMonth(viewDate) }}
</span>
<span (click)="activeViewDecade()" class="igx-calendar-picker__date">
<span tabindex="0" (keydown)="activeViewDecadeKB($event)" (click)="activeViewDecade()" class="igx-calendar-picker__date">
{{ formattedYear(viewDate) }}
</span>
</ng-template>
Expand All @@ -22,44 +22,41 @@ <h2 class="igx-calendar__header-date">

<div *ngIf="isDefaultView" class="igx-calendar__body" [@animateView]="activeView" (swiperight)="previousMonth()" (swipeleft)="nextMonth()">
<div class="igx-calendar-picker">
<div class="igx-calendar-picker__prev" (click)="previousMonth()">
<div tabindex="0" class="igx-calendar-picker__prev" (keydown.space)="previousMonthKB($event)" (click)="previousMonth()">
<igx-icon fontSet="material">keyboard_arrow_left</igx-icon>
</div>
<div>
<ng-container *ngTemplateOutlet="subheaderTemplate ? subheaderTemplate : defaultMonth; context: context">
</ng-container>
</div>
<div class="igx-calendar-picker__next" (click)="nextMonth()">
<div tabindex="0" class="igx-calendar-picker__next" (keydown.space)="nextMonthKB($event)" (click)="nextMonth()">
<igx-icon fontSet="material">keyboard_arrow_right</igx-icon>
</div>
</div>

<div class="igx-calendar__body-row">
<span *ngFor="let dayName of generateWeekHeader()" class="igx-calendar__label">
{{ dayName | titlecase }}
</span>
</div>

<div *ngFor="let week of getCalendarMonth; last as isLast; index as i; trackBy: rowTracker" class="igx-calendar__body-row" [@animateChange]="monthAction"
(@animateChange.done)="animationDone($event, isLast)">
<span [igxCalendarDate]="day" (onDateSelection)="childClicked($event)" *ngFor="let day of week; trackBy: dateTracker">
{{ formattedDate(day.date) }}
</span>
</div>
<igx-days-view [changeDaysView]="true" #days
[animationAction]="monthAction"
[locale]="locale"
[value]="value"
[weekStart]="weekStart"
[viewDate]="viewDate"
[selection]="selection"
[disabledDates]="disabledDates"
[specialDates]="specialDates"
(onDateSelection)="childClicked($event)">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename onDateSelection to onSelection. Applicable to all new views.

</igx-days-view>
</div>

<div *ngIf="isYearView" class="igx-calendar__body" [@animateView]="activeView">
<div class="igx-calendar__body-row--wrap">
<div (onMonthSelection)="changeMonth($event)" [igxCalendarMonth]="month" [index]="i" *ngFor="let month of months; index as i;">
{{ formattedMonth(month) | titlecase }}
</div>
</div>
</div>
<igx-months-view *ngIf="isYearView" [@animateView]="activeView" #months
[date]="viewDate"
[locale]="locale"
[monthFormat]="_formatOptions.month"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use public property formatOptions instead of the protected field (which is currently public).

(onMonthSelection)="changeMonth($event)" >
</igx-months-view>

<div *ngIf="isDecadeView" class="igx-calendar__body" [@animateView]="activeView">
<div class="igx-calendar__body-column" (wheel)="onScroll($event)" (pan)="onPan($event)">
<span (onYearSelection)="changeYear($event)" [igxCalendarYear]="year" *ngFor="let year of decade">
{{ formattedYear(year) }}
</span>
</div>
</div>
<igx-years-view *ngIf="isDecadeView" [@animateView]="activeView" #decade
[date]="viewDate"
[locale]="locale"
[yearFormat]="_formatOptions.year"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use public property formatOptions instead of the protected field (which is currently public).

(onYearSelection)="changeYear($event)">
</igx-years-view>
Loading