Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

API Documentation

Documentation for developing SailfishOS applications
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Detailed Description

TimePickerDialog QML Type

A dialog for selecting a time from a TimePicker More...

Import Statement: import Sailfish.Silica 1.0
Inherits:

Page

  • List of all members, including inherited members

Properties

  • hour : int
  • hourMode : enumeration
  • minute : int
  • time : date
  • timeText : string

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

hour : int

The value of the hour indicator in the displayed clock face.

See TimePicker::hour for more information.

See also hourMode.


hourMode : enumeration

Controls the range of values for the hour property.

See TimePicker::hourMode for more information.


minute : int

The value of the minute indicator in the displayed clock face.

See TimePicker::minute for more information.


time : date

Reports the currently selected time as a JS date object.

See TimePicker::time for more information.


timeText : string

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.


  • Legal
  • Contact Us
  • Jollyboys Ltd © 2024

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn