TimePicker
<TimePicker>
is a UI component that lets users select time.
See also: DatePicker.
<TimePicker
hour="9"
minute="25"
maxHour="23"
maxMinute="59"
minuteInterval="5"
(timeChange)="onTimeChanged($event)"
>
</TimePicker>
import { Component } from '@angular/core'
import { TimePicker } from '@nativescript/core'
@Component({
moduleId: module.id,
templateUrl: './usage.component.html'
})
export class UsageComponent {
todayObj: Date = new Date()
onTimeChanged(args) {
const tp = args.object as TimePicker
const time = args.value
console.log(`Chosen time: ${time}`)
}
}
Props
Name | Type | Description |
---|---|---|
|
|
Gets or sets the selected hour. |
|
|
Gets or sets the selected minute. |
|
|
Gets or sets the selected time. |
|
|
Gets or sets the minimum selectable hour. |
|
|
Gets or sets the maximum selectable hour. |
|
|
Gets or sets the minimum selectable minute. |
|
|
Gets or sets the maximum selectable minute. |
|
|
Gets or sets the selectable minute interval.
For example: 5 or 15 minutes.
+ Default value: |
|
|
Additional inherited properties are not shown. Refer to the API Reference |