TimePickerDialog QML Type | Fluid Reference Documentation

- Fluid Reference Documentation
- Fluid 1.2.0

# TimePickerDialog QML Type

Dialog with a picker to select time. More...

Import Statement: | import Fluid.Controls 1.1

- List of all members, including inherited members

## Properties

- orientation : enumeration
- prefer24Hour : bool
- selectedTime : date
- standardButtonsContainer : list<Object>

## Detailed Description

A dialog that lets you selected time.

     import QtQuick 2.10
     import Fluid.Controls 1.0 as FluidControls

     Item {
         width: 600
         height: 600

         FluidControls.TimePickerDialog {
             onAccepted: {
                 console.log(selectedDate);
             }
             standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel
         }
     }

For more information you can read the Material Design guidelines.

## Property Documentation

orientation : enumeration

This property holds the picker orientation. The default value is automatically selected based on the device orientation.

Possible values:

Constant | Description
--- | ---
`TimePicker.Landscape` | The picker is landscape.
`TimePicker.Portrait` | The picker is portrait.

prefer24Hour : bool

This property determines the visibility of the AM/PM switch.

selectedTime : date

This property holds the time that has been selected by the user. The default value is the current time.

standardButtonsContainer : list<Object>

This property allows you to place additional buttons alongside the standard buttons of the dialog, like in this example:

     FluidControls.TimePickerDialog {
         id: timePickerDialog
         standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel
         standardButtonsContainer: Button {
             anchors.verticalCenter: parent.verticalCenter
             text: qsTr("Now")
             flat: true
             onClicked: timePickerDialog.selectedTime = new Date()
         }
     }