viewDate update issue when setDatesDisabled is called
HTML
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker3.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
<h1>Try to change the month</h1>
<div id="test-datepicker" data-date="2015-10-27" data-date-format="yyyy-mm-dd" ></div>
JavaScript
/*
If setDatesDisabled is called, viewDate is changed to current date (unnecessarily)
Change external resource from
https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js
to:
https://rawgit.com/bielfrontera/bootstrap-datepicker/preserve_viewdate/js/bootstrap-datepicker.js
*/
$('#test-datepicker').datepicker();
$('#test-datepicker').on('changeMonth', function(ev){
$(this).datepicker('setDatesDisabled', ['2016-01-02']);
});