bootstrap embedded/inline 日期选择器显示上个月的 setDates

bootstrap embedded/inline datepicker show last month on setDates

我正在使用 bootstrap datepicker 并尝试从 returned 日期数组设置日期(事件),但是当我使用日期选择器的方法 (setDates) 设置日期时,它是显示事件数组中最后一个日期的月份,如何让它 return 到当前月份。

var events = ['02/02/2015','02/05/2015','02/09/2015','03/09/2015'];

    $('.calendar').datepicker({
                multidate: true,
                daysOfWeekDisabled: "0,1,2,3,4,5,6",
                todayHighlight: true
    });

    $('.calendar').datepicker('setDates', events);

JSFiddle

Demo

试试这个

 var todayDate = new Date()
var events = ['02/02/2015','02/05/2015','02/09/2015','03/09/2015',todayDate ];

    $('.calendar').datepicker({
                multidate: true,
                daysOfWeekDisabled: "0,1,2,3,4,5,6",
                todayHighlight: true
    });

    $('.calendar').datepicker('setDates', events );