Hi guys, I'm trying to create a search that has the ability to select a day.
I want to provide this option with a drop-down menu and with a calendar.
I am using Bootstrap and jQuery-UI datepicker.
My code works, both options work, BUT
I want when the user selects a day on the calendar to dynamically change the date in the drop-down menu.
Here is my code:
<div class="input-group col-lg-2 col-md-12 col-sm-12 search">
<label class="bd-form-label" style="float: left;width: 100%;">Dates</label>
<select name="name" id="name_id" style="width: 80%;float: left;">
<option value="">Any Month</option>
<option value="October 2017">October 2017</option>
<option value="November 2017">November 2017</option>
<option value="December 2017">December 2017</option>
<option value="January 2018">January 2018</option>
</select>
<input type="hidden" id="datepicker" class="hasDatepicker" value="16-Oct-2017" style="">
<img class="ui-datepicker-trigger" src="http://jqueryui.com/resources/demos/datepicker/images/calendar.gif" alt="..." title="...">
</div>
Run codeHide resultFor example, if a user clicks on a calendar in October 2019, select the option to display October 2019, because I have my input as <input type="hidden" />
.
Is this possible, or do I just need to have one of them?
Any feedback would be helpful.
Maria source
share