Skip to content

Commit

Permalink
docs(timepicker): add seconds step (valor-software#3572)
Browse files Browse the repository at this point in the history
* docs(timepicker): add seconds step
adding seconds steps in custom steps
close valor-software#3569

* docs(timepicker): add modefied files after update
  • Loading branch information
tarusin authored and valorkin committed Mar 1, 2018
1 parent 44fc789 commit 53441e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 7 additions & 1 deletion demo/src/app/components/+timepicker/demos/custom/custom.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<timepicker [(ngModel)]="mytime" [hourStep]="hstep" [minuteStep]="mstep"></timepicker>
<timepicker [(ngModel)]="mytime" [hourStep]="hstep" [minuteStep]="mstep" [showSeconds]="true" [secondsStep]="sstep"></timepicker>

<pre class="alert alert-info">Time is: {{mytime}}</pre>

Expand All @@ -15,4 +15,10 @@
<option *ngFor="let opt of options.mstep" [value]="opt">{{opt}}</option>
</select>
</div>
<div class="col-xs-6 col-6 col-md-3">
Seconds step is:
<select class="form-control" [(ngModel)]="sstep">
<option *ngFor="let opt of options.sstep" [value]="opt">{{opt}}</option>
</select>
</div>
</div>
8 changes: 5 additions & 3 deletions demo/src/app/components/+timepicker/demos/custom/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import { Component } from '@angular/core';
templateUrl: './custom.html'
})
export class DemoTimepickerCustomComponent {
hstep: number = 1;
mstep: number = 15;
hstep = 1;
mstep = 15;
sstep = 10;

mytime: Date = new Date();
options: any = {
hstep: [1, 2, 3],
mstep: [1, 5, 10, 15, 25, 30]
mstep: [1, 5, 10, 15, 25, 30],
sstep: [5, 10, 20, 30]
};
}

0 comments on commit 53441e5

Please sign in to comment.