I have a calendar that does not close on date select. So I have targeted a class(.day) to close the calendar when clicked. However, when I reopen the calendar and select a new date it does not close a second time. I have looked for answers on here and although similar titles and issues the code isn't quite the same...
$('.day').click(function () {
$(".datepicker").hide();
});
<span class="input-append date dp-ticket" data-date="today" data-date-format="dd-mm-yyyy">
<input type="text" class="add-on form-control col-xs-10 col-sm-10 col-md-10 col-lg-10" placeholder="Or, choose any date" name="startdate" id="startdate">
<button class="add-on btn btn-search col-xs-2 col-sm-2 col-md-2 col-lg-2" type="button">
<span class="icon-calendar"></span>
</button>
</span>