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
| Attribute | Type | Description |
|---|---|---|
| Media.js | list = ['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
| Name | Type | Description |
|---|---|---|
| attrs | dict = None | Optional dictionary of HTML attributes to be added to the widget. |
| format | string = None | The format in which the date will be displayed in the input field. |
Signature
def BaseAdminDateWidget(
attrs: dict = None,
format: string = None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| attrs | dict = None | A dictionary of HTML attributes to be added to the rendered input element. |
| format | string = None | The format string used to render the date value in the input field. |