-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* issue185: + append timepicker to input * issue185: + tests * + test to cover appendToBody fn * fix(ngx-timepicker-field): bug with changing minutes via input field * issue218: ! fix theming * fix(ngx-material-timepicker): formatting minutes * issue208: + hoursOnly input to prevent switching to minutes automatically * issue114: ! clicking area for 00 and 12 in 24 format * issue227: + timepickerClass input for setting custom css class * issue227: ! tests * issue185: + example
- Loading branch information
Showing
31 changed files
with
937 additions
and
548 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
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
78 changes: 78 additions & 0 deletions
78
...onents/ngx-material-timepicker-container/ngx-material-timepicker-container.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,78 @@ | ||
<div class="timepicker-backdrop-overlay" [overlay]="preventOverlayClick" | ||
[ngClass]="{'timepicker-backdrop-overlay--transparent': appendToInput}"></div> | ||
<div class="timepicker-overlay"> | ||
<ngx-material-timepicker-content [appendToInput]="appendToInput" | ||
[inputElement]="inputElement" | ||
[ngxMaterialTimepickerTheme]="theme"> | ||
<div class="timepicker" | ||
[@timepicker]="animationState" | ||
(@timepicker.done)="animationDone($event)" | ||
[ngClass]="timepickerClass"> | ||
<header class="timepicker__header"> | ||
<ngx-material-timepicker-dial [format]="format" [hour]="(selectedHour | async)?.time" | ||
[minute]="(selectedMinute | async)?.time" | ||
[period]="selectedPeriod | async" | ||
[activeTimeUnit]="activeTimeUnit" | ||
[minTime]="minTime" | ||
[maxTime]="maxTime" | ||
[isEditable]="enableKeyboardInput" | ||
[editableHintTmpl]="editableHintTmpl" | ||
[minutesGap]="minutesGap" | ||
(periodChanged)="changePeriod($event)" | ||
(timeUnitChanged)="changeTimeUnit($event)" | ||
(hourChanged)="onHourChange($event)" | ||
(minuteChanged)="onMinuteChange($event)" | ||
></ngx-material-timepicker-dial> | ||
</header> | ||
<div class="timepicker__main-content"> | ||
<div class="timepicker__body" [ngSwitch]="activeTimeUnit"> | ||
<div *ngSwitchCase="timeUnit.HOUR"> | ||
<ngx-material-timepicker-24-hours-face *ngIf="format === 24;else ampmHours" | ||
(hourChange)="onHourChange($event)" | ||
[selectedHour]="selectedHour | async" | ||
[minTime]="minTime" | ||
[maxTime]="maxTime" | ||
[format]="format" | ||
(hourSelected)="onHourSelected($event)"></ngx-material-timepicker-24-hours-face> | ||
<ng-template #ampmHours> | ||
<ngx-material-timepicker-12-hours-face | ||
(hourChange)="onHourChange($event)" | ||
[selectedHour]="selectedHour | async" | ||
[period]="selectedPeriod | async" | ||
[minTime]="minTime" | ||
[maxTime]="maxTime" | ||
(hourSelected)="onHourSelected($event)"></ngx-material-timepicker-12-hours-face> | ||
</ng-template> | ||
</div> | ||
<ngx-material-timepicker-minutes-face *ngSwitchCase="timeUnit.MINUTE" | ||
[selectedMinute]="selectedMinute | async" | ||
[selectedHour]="(selectedHour | async)?.time" | ||
[minTime]="minTime" | ||
[maxTime]="maxTime" | ||
[format]="format" | ||
[period]="selectedPeriod | async" | ||
[minutesGap]="minutesGap" | ||
(minuteChange)="onMinuteChange($event)"></ngx-material-timepicker-minutes-face> | ||
</div> | ||
<div class="timepicker__actions"> | ||
<div (click)="close()"> | ||
<!--suppress HtmlUnknownAttribute --> | ||
<ng-container | ||
*ngTemplateOutlet="cancelBtnTmpl ? cancelBtnTmpl : cancelBtnDefault"></ng-container> | ||
</div> | ||
<div (click)="setTime()"> | ||
<!--suppress HtmlUnknownAttribute --> | ||
<ng-container | ||
*ngTemplateOutlet="confirmBtnTmpl ? confirmBtnTmpl : confirmBtnDefault"></ng-container> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</ngx-material-timepicker-content> | ||
</div> | ||
<ng-template #cancelBtnDefault> | ||
<ngx-material-timepicker-button>Cancel</ngx-material-timepicker-button> | ||
</ng-template> | ||
<ng-template #confirmBtnDefault> | ||
<ngx-material-timepicker-button>Ok</ngx-material-timepicker-button> | ||
</ng-template> |
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
Oops, something went wrong.