[HIMA-182] Applierd QA fixes for HIMA-182

This commit is contained in:
Eraldo Hasanaj
2019-10-25 15:43:49 +02:00
parent 18cd8395a3
commit ac6f024b94
7 changed files with 44 additions and 14 deletions

View File

@@ -1,6 +1,13 @@
<div class="selected" (click)="toggle()">
<span>{{ selected | date: 'dd.MM.yy' }}</span>
<lib-icon class="icon" [rotateBackwards]="expanded" transition="all 0.2s linear" width="17px" name="Arrow_Down_2_branch"></lib-icon>
<lib-icon
*ngIf="!disabled"
class="icon"
[rotateBackwards]="expanded"
transition="all 0.2s linear"
width="17px"
name="Arrow_Down_2_branch"
></lib-icon>
</div>
<div class="calendar" *ngIf="expanded">

View File

@@ -9,6 +9,7 @@ import { ViewRef_ } from '@angular/core/src/view';
})
export class DatePickerComponent implements OnInit {
@Input() selected: Date;
@Input() disabled = false;
expanded = false;
today = new Date();
baseDate: Date;
@@ -136,6 +137,9 @@ export class DatePickerComponent implements OnInit {
}
toggle() {
if (this.disabled) {
return;
}
this.expanded = !this.expanded;
if (this.expanded) {
this.initialize();