forked from valor-software/ngx-bootstrap
-
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(timepicker): showMinutes flag for toggle MinutesField in timepic…
…ker(valor-software#2430)
- Loading branch information
Showing
13 changed files
with
94 additions
and
34 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
3 changes: 0 additions & 3 deletions
3
demo/src/app/components/+timepicker/demos/seconds/seconds.html
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
demo/src/app/components/+timepicker/demos/seconds/seconds.ts
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
demo/src/app/components/+timepicker/demos/toggle-minutes-seconds/toggle-minutes-seconds.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,10 @@ | ||
<timepicker [(ngModel)]="myTime" [showMinutes]="showMin" [showSeconds]="showSec"></timepicker> | ||
|
||
<pre class="alert alert-info">Time is: {{myTime}}<br>showMinutes: {{showMin}}<br>showSeconds: {{showSec}}</pre> | ||
|
||
<button class="btn btn-default text-center" (click)="toggleMinutes()"> | ||
{{showMin? 'Hide minutes' : 'Show minutes'}} | ||
</button> | ||
<button class="btn btn-default text-center" (click)="toggleSeconds()"> | ||
{{showSec? 'Hide seconds' : 'Show seconds'}} | ||
</button> |
20 changes: 20 additions & 0 deletions
20
demo/src/app/components/+timepicker/demos/toggle-minutes-seconds/toggle-minutes-seconds.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,20 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'demo-timepicker-seconds', | ||
templateUrl: './toggle-minutes-seconds.html' | ||
}) | ||
export class DemoTimepickerToggleMinutesSecondsComponent { | ||
myTime: Date = new Date(); | ||
showMin: boolean = true; | ||
showSec: boolean = true; | ||
|
||
toggleMinutes(): void { | ||
this.showMin = !this.showMin; | ||
} | ||
|
||
toggleSeconds(): void { | ||
this.showSec = !this.showSec; | ||
} | ||
|
||
} |
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
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