Текст документации сгенерирован автоматически из исходного кода.
Если обнаружили ошибку, отправьте об этом сообщение на 📧почту.
DateTimeProperty
Inherits: Property
Class of property that provides input of date and time.
Notes: Datetime parameters can be in range from 1752-09-15_00:00:00 to 9999-12-31_23:59:59 Property value can accept objects: PySide6.QtCore.QDateTime and datetime.datetime and string with format: 2026-12-25_01:25:16 (<year>-<month>-<day>_<hour>:<min>:<sec>)
Attributes:
- value_changed: str — This signal is emitted when value is changed.
Constructor:
def DateTimeProperty.__init__(default_value: str = '2026-07-05_23:22:00', name: str | LangConstant = tr.UNNAMED, min_datetime: str = '1752-09-15_00:00:00', max_datetime: str = '9999-12-31_23:59:59', display_format: str | LangConstant = 'dd.MM.yyyy HH:mm', show_popup_calendar: bool = True, tooltip: str | LangConstant = '', show_reset_btn: bool = True)
Initializes class of property.
The description of the arguments is identical to the description of the parameters with the same names.
Parameters:
- default_value: str — default value of property
- name: str | LangConstant — property name
- min_datetime: str — minimum datetime value
- max_datetime: str — maximum datetime value
- display_format: str | LangConstant — display format in input widget (QDateTimeEdit.displayFormat)
- show_popup_calendar: bool — visibility of calendar widget in input widget (QDateTimeEdit)
- tooltip: str | LangConstant — tooltip text
- show_reset_btn: bool — state of reset button displaying
Properties
min_datetime
Minimum datetime. Represents date and time data in string. String format: 2026-12-25_01:25:16 (<year>-<month>-<day>_<hour>:<min>:<sec>)
Notes: Must be less than [max_datetime]. Must be greater or equal «1752-09-15_00:00:00»
Returns:
- str — minimum datetime
max_datetime
Maximum datetime. Represents date and time data in string. String format: 2026-12-25_01:25:16 (<year>-<month>-<day>_<hour>:<min>:<sec>)
Notes: Must be greater than [min_datetime]. Must be less or equal «9999-12-31_23:59:59»
Returns:
- str — maximum datetime
display_format
The format for displaying the date and time. For example: «dd.MM.yyyy» (02.07.1969); «MMM d yy» (Jul 2 69); «MMMM d yy» (July 2 69) For more info check: https://doc.qt.io/qtforpython-6/PySide6/QtWidgets/QDateTimeEdit.html#PySide6.QtWidgets.QDateTimeEdit.displayFormat
Returns:
- str — display format
show_popup_calendar
Visibility of calendar widget in QDateTimeEdit.
Returns:
- bool — popup calendar visibility state
tooltip
Tooltip of the property's widget
Returns:
- str | LangConstant — tooltip text of the property's widget
name
Property name, this text is displayed in PropertyContainer form editing values.
Returns:
- str | LangConstant — property name
show_reset_btn
State of reset button displaying. This button is displayed if value isn't equal to default value.
Returns:
- bool — state of reset button displaying
default_value
Default value of property Represents date and time data in string. String format: 2026-12-25_01:25:16 (<year>-<month>-<day>_<hour>:<min>:<sec>)
Returns:
- str — default value of property
Methods
get_input_widget
def get_input_widget() -> QDateTimeEdit
Returns:
- QDateTimeEdit — (without description)
get_datetime_object
def get_datetime_object() -> datetime
Returns property value as datetime object.
Returns:
- datetime — datetime object
get_qdatetime_object
def get_qdatetime_object() -> QDateTime
Returns property value as QDateTime object.
Returns:
- QDateTime — QDateTime object