Skip to main content

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

AttributeTypeDescription
format_keystring = DATE_INPUT_FORMATSThe key used to look up the date input format strings from the active language's settings.
template_namestring = django/forms/widgets/date.htmlThe 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

NameTypeDescription
attrsdict = nullA dictionary of HTML attributes to be added to the rendered input element
formatstring = nullThe specific date format string used to render the value in the input field