-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
…3611) * feat(timepicker): add validation for timepicker Add validation for timepicker based on ui-bootstrap validation. Fix min-max validation issue. close #3549 #3288 * feat(timepicker): Add ability to set readonly/disabled state #3602 Add ability to set readonly/disabled state Add disabled demo Fix bud related to highlight input in readonly mood Extend test for timepicker Close #3602 #3371
- Loading branch information
1 parent
8182d92
commit 4e5f828
Showing
16 changed files
with
654 additions
and
196 deletions.
There are no files selected for viewing
6 changes: 2 additions & 4 deletions
6
demo/src/app/components/+timepicker/demos/disabled/disabled.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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
<timepicker [(ngModel)]="mytime" [showMeridian]="ismeridian" [readonlyInput]="!isEnabled"></timepicker> | ||
<timepicker [(ngModel)]="myTime" [showMeridian]="isMeridian" [disabled]="!isDisabled"></timepicker> | ||
<hr> | ||
|
||
<button type="button" class="btn btn-info" (click)="isEnabled=!isEnabled">Enable / Disable input</button> | ||
|
||
<button type="button" class="btn btn-info" (click)="isDisabled=!isDisabled">Enable / Disable input</button> |
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
3 changes: 3 additions & 0 deletions
3
demo/src/app/components/+timepicker/demos/readonly/readonly.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,3 @@ | ||
<timepicker [(ngModel)]="myTime" [showMeridian]="isMeridian" [readonlyInput]="!readonly"></timepicker> | ||
<hr> | ||
<button type="button" class="btn btn-info" (click)="readonly=!readonly">Editable / Readonly input</button> |
11 changes: 11 additions & 0 deletions
11
demo/src/app/components/+timepicker/demos/readonly/readonly.ts
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,11 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'demo-timepicker-readonly', | ||
templateUrl: './readonly.html' | ||
}) | ||
export class DemoTimepickerReadonlyComponent { | ||
isMeridian = false; | ||
readonly = true; | ||
myTime = new Date(); | ||
} |
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
Oops, something went wrong.