QDateEdit allows the user to edit dates by using the keyboard or the arrow keys to increase/decrease date values. The arrow keys can be used to move from section to section within the QDateEdit box. Dates appear in accordance with the local date/time settings or in year, month, day order if the system doesn't provide this information. It is recommended that the QDateEdit be initialised with a date, e.g.
.PP
.nf
.br
QDateEdit *dateEdit = new QDateEdit( QDate::currentDate(), this );
Here we've created a new QDateEdit object initialised with today's date and restricted the valid date range to today plus or minus 365 days. We've set the order to month, day, year. If the auto advance property is TRUE (as we've set it here) when the user completes a section of the date, e.g. enters two digits for the month, they are automatically taken to the next section.
.PP
The maximum and minimum values for a date value in the date editor default to the maximum and minimum values for a QDate. You can change this by calling setMinValue(), setMaxValue() or setRange().
.PP
Terminology: A QDateEdit widget comprises three 'sections', one each for the year, month and day. You can change the separator character using QDateTimeEditor::setSeparator(), by default the separator will be taken from the systems settings. If that is not possible, it defaults to "-".
.PP
<center>
.ce 1
.B "[Image Omitted]"
.PP
</center>
.PP
See also QDate, QTimeEdit, QDateTimeEdit, Advanced Widgets, and Time and Date.
.SS "Member Type Documentation"
.SH "QDateEdit::Order"
This enum defines the order in which the sections that comprise a date appear.
.TP
\fCQDateEdit::MDY\fR - month-day-year
.TP
\fCQDateEdit::DMY\fR - day-month-year
.TP
\fCQDateEdit::YMD\fR - year-month-day (the default)
.TP
\fCQDateEdit::YDM\fR - year-day-month (included for completeness; but should not be used)
Returns the formatted number for section \fIsec\fR. This will correspond to either the year, month or day section, depending on the current display order.
Sets the valid input range for the editor to be from \fImin\fR to \fImax\fR inclusive. If \fImin\fR is invalid no minimum date will be set. Similarly, if \fImax\fR is invalid no maximum date will be set.
Enables/disables the push buttons according to the min/max date for this widget.
.SH "void QDateEdit::valueChanged ( const QDate & date )\fC [signal]\fR"
This signal is emitted whenever the editor's value changes. The \fIdate\fR parameter is the new value.
.SS "Property Documentation"
.SH "bool autoAdvance"
This property holds whether the editor automatically advances to the next section.
.PP
If autoAdvance is TRUE, the editor will automatically advance focus to the next date section if a user has completed a section. The default is FALSE.
.PP
Set this property's value with setAutoAdvance() and get this property's value with autoAdvance().
.SH "QDate date"
This property holds the editor's date value.
.PP
If the date property is not valid, the editor displays all zeroes and QDateEdit::date() will return an invalid date. It is strongly recommended that the editor is given a default date value (e.g. currentDate()). That way, attempts to set the date property to an invalid date will fail.
.PP
When changing the date property, if the date is less than minValue(), or is greater than maxValue(), nothing happens.
.PP
Set this property's value with setDate() and get this property's value with date().
.SH "QDate maxValue"
This property holds the editor's maximum value.
.PP
Setting the maximum date value for the editor is equivalent to calling QDateEdit::setRange( minValue(), \fId\fR ), where \fId\fR is the maximum date. The default maximum date is 8000-12-31.
.PP
See also minValue and setRange().
.PP
Set this property's value with setMaxValue() and get this property's value with maxValue().
.SH "QDate minValue"
This property holds the editor's minimum value.
.PP
Setting the minimum date value is equivalent to calling QDateEdit::setRange( \fId\fR, maxValue() ), where \fId\fR is the minimum date. The default minimum date is 1752-09-14.
.PP
See also maxValue and setRange().
.PP
Set this property's value with setMinValue() and get this property's value with minValue().
.SH "Order order"
This property holds the order in which the year, month and day appear.
.PP
The default order is locale dependent.
.PP
See also Order.
.PP
Set this property's value with setOrder() and get this property's value with order().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qdateedit.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in