DateTimePicker QML Type | Fluid Reference Documentation

- Fluid Reference Documentation
- Fluid 1.2.0

# DateTimePicker QML Type

Control to select a both date and time. More...

Import Statement: | import Fluid.Controls 1.1

- List of all members, including inherited members

## Properties

- background : Item
- dayOfWeekRowVisible : bool
- footer : Item
- from : date
- header : Item
- locale : Locale
- mode : enumeration
- orientation : enumeration
- prefer24Hour : bool
- selectedDateTime : date
- selector : Item
- to : date
- weekNumberVisible : bool

## Detailed Description

Stand-alone control to select both date and time.

      import QtQuick 2.10
      import Fluid.Controls 1.0 as FluidControls

      Item {
          width: 600
          height: 600

          FluidControls.DateTimePicker {
              anchors.centerIn: parent
              onSelectedDateTimeChanged: {
                  console.log("You have selected:", selectedDateTime);
              }
          }
      }

For more information you can read the Material Design guidelines.

## Property Documentation

background : Item

This property holds the background item.

dayOfWeekRowVisible : bool

This property determines the visibility of the day of week row.

footer : Item

This property holds the footer item.

from : date

This property holds the start date.

header : Item

This property holds the header item.

locale : Locale

This property holds the locale of the control.

mode : enumeration

This property holds the current selection mode.

It is changed by the user, clicking on the year or calendar.

Possible values:

Constant | Description
--- | ---
`DateTimePicker.Year` | The user is selecting the year.
`DateTimePicker.Month` | The user is selecting the month.
`DateTimePicker.Hour` | The user is selecting the hour.
`DateTimePicker.Minute` | The user is selecting the minute.
`DateTimePicker.Second` | The user is selecting the second.

orientation : enumeration

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

Possible values:

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

prefer24Hour : bool

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

selectedDateTime : date

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

selector : Item

This property holds the selector item.

to : date

This property holds the end date.

weekNumberVisible : bool

This property determines the visibility of the week number column.