jquery ui datepicker setDate bug
Show how calling setDate on a none-focused datepicker change context of an open datepicker
HTML
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<div>
<p>
focusing the first date field and selecting a date in the calendar then display will always result in changing the second input, due to the "beforeShow" function provided.
</p>
<input type="text" id="date_1" class="date-field"/>
<input type="text" id="date_2" class="date-field"/>
</div>
JavaScript
$(".date-field").datepicker({defaultDate: '2018-11-07'});