src/components/fsdatepickersummary/fsdatepickersummary.component.ts
| selector | fsDatePickerSummary |
| styleUrls | fsdatepickersummary.component.scss |
| templateUrl | ./fsdatepickersummary.component.html |
Properties |
|
Methods |
Inputs |
Outputs |
constructor(fsDatePickerCommon: FsDatePickerCommon, fsDatePickerModel: FsDatePickerModel)
|
||||||||||||
|
Parameters :
|
endDate
|
Default value: |
startDate
|
Default value: |
componentsChange
|
$event type: EventEmitter
|
| ngOnChanges | ||||||||||
ngOnChanges(changes: )
|
||||||||||
|
Parameters :
Returns :
void
|
| ngOnInit |
ngOnInit()
|
|
Returns :
void
|
| onComponentsChange | ||||||||||
onComponentsChange(view: )
|
||||||||||
|
Parameters :
Returns :
void
|
| Public formattedEndDate |
formattedEndDate:
|
Type : null
|
Default value : null
|
| Public formattedStartDate |
formattedStartDate:
|
Type : null
|
Default value : null
|
| Public fsDatePickerModel |
fsDatePickerModel:
|
Type : FsDatePickerModel
|
<div *ngIf="formattedStartDate || formattedEndDate" class="summary">
<ng-container *ngIf="formattedStartDate">
<div
(click)="onComponentsChange({ calendarStart: true, calendarEnd: true })"
[ngClass]="{ active: fsDatePickerModel.components.calendarStart }">{{ formattedStartDate.date }}
</div>
<div
(click)="onComponentsChange({ timeStart: true })"
[ngClass]="{ active: fsDatePickerModel.components.timeStart }">{{ formattedStartDate.time }}
</div>
</ng-container>
<ng-container *ngIf="formattedStartDate && formattedEndDate"> - </ng-container>
<ng-container *ngIf="formattedEndDate">
<div
(click)="onComponentsChange({ calendarStart: true, calendarEnd: true })"
[ngClass]="{ active: fsDatePickerModel.components.calendarEnd }">{{ formattedEndDate.date }}
</div>
<div
(click)="onComponentsChange({ timeEnd: true })"
[ngClass]="{ active: fsDatePickerModel.components.timeEnd }">{{ formattedEndDate.time }}
</div>
</ng-container>
</div>