Skip to main content

BaseAdminDateWidget

This class provides a base implementation for date input widgets used within an administrative interface. It integrates specific JavaScript resources for calendar functionality and shortcuts while ensuring the input element carries standard CSS classes and size attributes for consistent styling.

Attributes

AttributeTypeDescription
Media.jslist = ['admin/js/calendar.js', 'admin/js/admin/DateTimeShortcuts.js']List of JavaScript file paths required to provide the calendar picker and date shortcut functionality in the admin interface.

Constructor

Signature

def BaseAdminDateWidget(
attrs: dict = None,
format: string = None
) - > null

Parameters

NameTypeDescription
attrsdict = NoneOptional dictionary of HTML attributes to be added to the widget.
formatstring = NoneThe format in which the date will be displayed in the input field.

Signature

def BaseAdminDateWidget(
attrs: dict = None,
format: string = None
) - > null

Parameters

NameTypeDescription
attrsdict = NoneA dictionary of HTML attributes to be added to the rendered input element.
formatstring = NoneThe format string used to render the date value in the input field.