Class “TimeDialog”

Object > NativeObject > Popup > TimeDialog

A TimeDialog represents a native dialog pop-up allowing the user to pick a time of day. Properties can only be set before open() is called. The dialog is automatically disposed when closed.

TimeDialog on Android
Android
TimeDialog on iOS
iOS
Constructor public
Singleton No
Namespace tabris
Direct subclasses None
JSX support Element: <TimeDialog/>
Child elements: None
Text content: Not supported

Example

import {TimeDialog} from 'tabris';

new TimeDialog()
  .onSelect(({date}) => console.log(`Selected ${date}`))
  .open();

See also:

Constructor

new TimeDialog(properties?)

Parameter Type Optional Description
properties Properties<TimeDialog> Yes Sets all key-value pairs in the properties object as widget properties.

Properties

date

The time to be displayed in the dialog. The current date is used when no date is provided.

Type Date
Settable Yes

Events

close

Fired when the time dialog was closed.

Parameter Type Description
date Date | null The selected time. Can be null when no date was selected.

select

Fired when a time was selected by the user.

Parameter Type Description
date Date The selected time. Only the time components reflect the users selection. The date component values are undefined.

Change Events

dateChanged

Fired when the date property has changed.

Parameter Type Description
value Date The new value of date.