Bases: SelectMultiple
Custom widget for Choices.js. Adds the required attributes.
Source code in hypha/apply/funds/widgets.py
| def __init__(self, *args, **kwargs):
attrs = kwargs.get("attrs", {})
# Add the date attribute for Choices.js initialization
attrs.setdefault("data-js-choices", "")
attrs.setdefault("data-placeholder", "")
kwargs["attrs"] = attrs
super().__init__(*args, **kwargs)
|