django-bootstrap-datepicker-plus icon indicating copy to clipboard operation
django-bootstrap-datepicker-plus copied to clipboard

Set the addon_icon_class context on the widget key

Open androettop opened this issue 1 year ago • 0 comments

Purpose

This PR addresses an issue where the picker icons are not showing in the latest version (5.0.5) of django-bootstrap-datepicker-plus when using a custom MultiWidget input with DatePickerInput and TimePickerInput. This issue was originally raised in this GitHub issue.

Approach

This change fixes the missing picker icons by adjusting the context returned by BasePickerInput. Specifically, it modifies the context dictionary to correctly pass the addon_icon_class to the widget template.

Issues solved in this PR

  • [x] Missing picker icons in custom MultiWidget input.

What has Changed

  • Adjusted _base.py to ensure the addon_icon_class is passed correctly in the context.
  • Updated the input.html template to use widget.addon_icon_class instead of addon_icon_class.

androettop avatar Oct 30 '24 10:10 androettop