Skip to main content

angular bootstrap - Timepicker custom steps

app.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})


export class AppComponent {
  time = {hour: 4, minute: 19, second:1};
}
app.component.html

<h4 style="padding-top:25px; padding-bottom:25px;">
  Angular Bootstrap - Timepicker custom steps
</h4>

<h5><b>Selected Time:</b></h5>
<br/>

<h5>{{time | json}}</h5>
<br/>

<ngb-timepicker [(ngModel)]="time" 
  [hourStep]="2" [minuteStep]="5"
  [secondStep]="10" [seconds]="true">
</ngb-timepicker>
More Angular tutorials