MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QML DatePickerDialog Element

DatePickerDialog is a Dialog for selecting a date More...

Inherits Dialog

This element was introduced in qt-components 4.7.

Properties

Detailed Description

Dialog that shows a date picker.

 DatePickerDialog {
     id: tDialog
     titleText: "Date of birth"
     onAccepted: callbackFunction()
 }

 function launchDialog() {
     tDialog.open();
 }

 function launchDialogToToday() {
     var d = new Date();
     tDialog.year = d.getFullYear();
     tDialog.month = d.getMonth();
     tDialog.day = d.getDate();
     tDialog.open();
 }

 function callbackFunction() {
     result.text = tDialog.year + " " + tDialog.month + " " + tDialog.day
 }

See also Dialog.

Property Documentation

acceptButtonText : string

Optional, the button text for the accept button.


day : int

Property default is 1

The displayed day.


maximumYear : int

Property default is current year + 20

Optional, the maximum year shown on the tumbler. This property should only be set once during construction. Modifying it afterwards will uninitialize everything. If the value is not specified, it is default to current year + 20.


minimumYear : int

Property default is current year - 1

Optional, the minimum year shown on the tumbler. This property should only be set once during construction. Modifying it afterwards will uninitialize everything. If the value is not specified, it is default to current year - 1.


month : int

Property default is 1

The displayed month.


rejectButtonText : string

Optional, the button text for the reject button.


titleText : string

If not null, it will be used as the title text for the dialog. If further customization is needed, use property title instead


year : int

Property default is 0

The displayed year.