API Documentation
Documentation for developing SailfishOS applicationsTimePickerDialog QML Type
A dialog for selecting a time from a TimePicker More...
Import Statement: | import Sailfish.Silica 1.0 |
Inherits: |
Properties
Detailed Description
The TimePickerDialog type presents a TimePicker within a Dialog to enable the user to specify a time using a clock-face interface.
The dialog shows the currently selected time in the center of the clock. If the user accepts the dialog, the hour, minute and timeText properties are set according to the selected time; otherwise, these values are left unchanged.
Here is a simple time picker dialog, opened with PageStack::push():
import QtQuick 2.2 import Sailfish.Silica 1.0 Button { id: button text: "Choose a time" onClicked: { var dialog = pageStack.push("Sailfish.Silica.TimePickerDialog", { hour: 13, minute: 30, hourMode: DateTime.TwelveHours }) dialog.accepted.connect(function() { button.text = "You chose: " + dialog.timeText }) } }
The TimePickerDialog provides a convenient way to request a time value from the user through a dialog-type interface. If you require the clock-face interface without the dialog container, use TimePicker instead.
See also TimePicker, DatePickerDialog, and Dialog.
Property Documentation
The value of the hour indicator in the displayed clock face.
See TimePicker::hour for more information.
See also hourMode.
Controls the range of values for the hour property.
See TimePicker::hourMode for more information.
The value of the minute indicator in the displayed clock face.
See TimePicker::minute for more information.
Reports the currently selected time as a JS date object.
See TimePicker::time for more information.
Reports the currently selected date as a formatted time string, in "hh:mm" format. If hourMode is DateTime.TwelveHours, an AM/PM indicator is included.
See TimePicker::timeText for more information.