DateTimeInput
This class provides a specialized input widget for handling date and time values within forms. It utilizes a specific template for rendering and relies on localized format patterns to ensure consistent data entry and validation.
Attributes
| Attribute | Type | Description |
|---|---|---|
| format_key | string = DATETIME_INPUT_FORMATS | The key used to look up the datetime input formats in the active language's locale settings. |
| template_name | string = django/forms/widgets/datetime.html | The path to the HTML template used to render the datetime input widget. |
Constructor
Signature
def DateTimeInput()
Signature
def DateTimeInput(
attrs: dict = null,
format: string = null
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| attrs | dict = null | A dictionary of HTML attributes to be added to the rendered input element. |
| format | string = null | The format string used to render the datetime value in the input field; if not provided, the default DATETIME_INPUT_FORMATS will be used. |