-
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.
feat(timepicker): add inputs validation (#2187)
* feat(timepicker): add inputs validation * fix(timepicker): add isPM support * feat(timepicker): add isValid output
- Loading branch information
1 parent
21e48e5
commit 7e80486
Showing
5 changed files
with
35 additions
and
16 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
demo/src/app/components/+timepicker/demos/dynamic/dynamic.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,6 +1,7 @@ | ||
<timepicker [(ngModel)]="mytime" (change)="changed()"></timepicker> | ||
<timepicker [(ngModel)]="mytime" (change)="changed()" (isValid)="isValid = $event"></timepicker> | ||
|
||
<pre class="alert alert-info">Time is: {{mytime}}</pre> | ||
<pre *ngIf="!isValid" class="alert alert-danger">Invalid time format</pre> | ||
|
||
<button type="button" class="btn btn-primary" (click)="update()">Set to 14:00</button> | ||
<button type="button" class="btn btn-danger" (click)="clear()">Clear</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
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