DateInput
This class represents a date input widget for HTML forms, specifically designed to handle date-specific data entry. It inherits from a base date-time input class and utilizes a specialized template and format configuration to ensure consistent date rendering and parsing.
Attributes
| Attribute | Type | Description |
|---|---|---|
| format_key | string = DATE_INPUT_FORMATS | The key used to look up the date input format strings from the active language's settings. |
| template_name | string = django/forms/widgets/date.html | The file path to the HTML template used for rendering the date input widget. |
Constructor
Signature
def DateInput() - > null
Signature
def DateInput(
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 specific date format string used to render the value in the input field |