4.9. Date widget class

The Date class inherits QComboBox Qt class.

Widget's input value

A string representing a date in the format defined in value_format. If the value is the string now the current date is used.

Widget's attributes

first_day
This attribute holds the first day of the week, it defaults to 1 which is Monday.
display_format
The format used to display the selected date. The default format is ddd dd/MM/yyyy. For syntax details, see the toString function of the QDate class in Qt documentation.
value_format
This attribute holds the format used to specify the date in the setValue function and the attributes : value, min and max. It defaults to yyyy-M-d.
input_format
This attribute holds the format used to enter the date manually via the keyboard. It defaults to d/M/yyyy.
input_mask
This attribute holds the validation input mask, it defaults to 00/00/0000. For syntax details, see the inputMask property of the QLineEdit class in Qt documentation.
input_validation
This attribute holds a string used to validate a date entred by the user. The string is composed of four parts : the first is the separator used between date elements (day, month and year), the second, third and fourth are the position of the date's elements. The default input validation string is /,d,m,y.
min
Dates before min cannot be selected. This attribute is specified in the format defined in value_format.
max
Dates after max cannot be selected. This attribute is specified in the format defined in value_format.

Widget's output value

A string representing the selected date in the format defined in value_format.