- Fluid Reference Documentation
- Fluid 1.0.0

# DatePickerDialog QML Type

Dialog to select a single date More...

Import Statement: | import Fluid.Controls 1.0

- List of all members, including inherited members

## Properties

- dayOfWeekRowVisible : bool
- from : date
- orientation : enumeration
- selectedDate : date
- standardButtonsContainer : list<Object>
- to : date
- weekNumberVisible : bool

## Detailed Description

Dialog to select a single date from a calendar.

      import QtQuick 2.10
      import Fluid.Controls 1.0 as FluidControls

      Item {
          width: 600
          height: 600

          Button {
              anchors.centerIn: parent
              text: qsTr("Open")
              onClicked: datePickerDialog.open()
          }

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

For more information you can read the Material Design guidelines.

## Property Documentation

dayOfWeekRowVisible : bool

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

from : date

This property holds the start date.

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.

selectedDate : date

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

standardButtonsContainer : list<Object>

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

      FluidControls.DatePickerDialog {
          id: datePickerDialog
          standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel
          standardButtonsContainer: Button {
              anchors.verticalCenter: parent.verticalCenter
              text: qsTr("Today")
              flat: true
              onClicked: datePickerDialog.selectedDate = new Date()
          }
      }

to : date

This property holds the end date.

weekNumberVisible : bool

This property determines the visibility of the week number column.