How to open a datapicker calendar on a specific month if dates of other months are selected besides it?

  • 0
    The bottom line is that several dates are selected, which then, when you open the calendar, are already selected in it, but the calendar opens on the month of the last date, but you need it on the one that I need, well, or at least on the current

    let date_for_datepicker = [];
                dates_array.forEach(function (elem) {
                    let elem_array = elem.split('.');
                    date_for_datepicker.push(new Date(elem_array[2], elem_array[1] - 1, elem_array[0]));
                    let datepicker = $("#datepicker");
                        language: 'ru',
                        multidate: true,
                    datepicker.find('div').css('margin', 'auto');
                    datepicker.datepicker('setDates', date_for_datepicker);

    At the moment, it turns out that when you open the calendar it focuses like this.
    And you need it
    JavaScript Anonymous, Jan 9, 2019

  • 0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!