I would like to utilize bootstrap datepicker to style the date filters in a report, as shown below:
The HTML I'm using is:
<a href="javascript:;" class="badge badge-info datepicker filter_date_start_dp" data-date-format="mm/dd/yyyy"><i class="fal fa-filter" aria-hidden="true"></i> 11/1/2021</a>
The calendar is opening and selecting values does set the value correctly in the hidden input element.
The issues I'm experiencing are:
The date is not appearing selected on first click.
How can I transfer the selected date value to the text inside the anchor tag?
The calendar is not closing.
I'll need to refresh the page on selection.
I don't know how to handle #2 and #4 above since datePicker doesn't appear to emit any events.
I followed sage advice from this post but it doesn't appear to help:
how to show date picker on link click with jquery
There are all the same issues plus the datepicker shows up in the top left of the page.
