forked from NationalBankBelgium/stark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stark-ui): add
stark-date-time-picker
component
- add component - add demo CLOSES ISSUE: NationalBankBelgium#587
- Loading branch information
1 parent
686c0f7
commit 7a40702
Showing
18 changed files
with
480 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./date-time-picker/date-time-picker.module"; | ||
export * from "./date-time-picker/components"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./components/date-time-picker.component"; |
29 changes: 29 additions & 0 deletions
29
packages/stark-ui/src/modules/date-time-picker/components/date-time-picker.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<div class="date-time-wrapper" [formGroup]="dateTimeFormGroup"> | ||
<stark-date-picker | ||
[pickerId]="pickerId" | ||
[pickerName]="pickerName" | ||
formControlName="date" | ||
(dateChange)="handleChange()" | ||
[dateFilter]="dateFilter" | ||
[dateMask]="dateMask" | ||
[required]="required" | ||
[max]="max" | ||
[min]="min" | ||
[disabled]="disabled" | ||
></stark-date-picker> | ||
|
||
<input | ||
matInput | ||
#timeInput | ||
formControlName="time" | ||
(blur)="handleChange()" | ||
[starkTimestampMask]="timeMask" | ||
[disabled]="disabled" | ||
[required]="required" | ||
/> | ||
<div class="mat-form-field-suffix mat-datepicker-toggle"> | ||
<button mat-icon-button (click)="focusTime($event)"> | ||
<mat-icon svgIcon="clock"></mat-icon> | ||
</button> | ||
</div> | ||
</div> |
28 changes: 28 additions & 0 deletions
28
packages/stark-ui/src/modules/date-time-picker/components/date-time-picker.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
stark-date-time-picker { | ||
.date-time-wrapper { | ||
width: 100%; | ||
display: flex; | ||
|
||
input { | ||
text-align: right; | ||
} | ||
|
||
// Time | ||
> input.mat-input-element { | ||
flex: 1; | ||
} | ||
|
||
// Date | ||
> stark-date-picker { | ||
flex: 1; | ||
} | ||
} | ||
|
||
.mat-datepicker-toggle { | ||
transition: color 500ms; | ||
} | ||
|
||
&:not(.floating) .mat-datepicker-toggle { | ||
color: rgba(0, 0, 0, 0); | ||
} | ||
} |
Oops, something went wrong.