K
K
kursof2016-11-21 01:37:09
JavaScript
kursof, 2016-11-21 01:37:09

Why is the next (2017) year not highlighted in the calendar?

not assigned by 2017, what to do?
http://jsfiddle.net/
var active_dates = ["15/11/2016", "16/01/2017"];

$("#datepicker").datepicker({
     format: "dd/mm/yyyy", 
 todayHighlight: true,
     maxViewMode: 0,
    beforeShowMonth: 1,
  beforeShowDay: function(date){
       var d = date;
       var curr_date = d.getDate();
       var curr_month = d.getMonth() + 1; //Months are zero based
       var curr_year = d.getFullYear() ;
       var formattedDate = curr_date + "/" + curr_month + "/" + curr_year

         if ($.inArray(formattedDate, active_dates) != -1){
           return {
            classes: 'booked '
           };
         }
        return;
      }
    });

there is a similar problem, not how can't do it stackoverflow.com/questions/20213408/jquery-datepi...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav Ivanov, 2016-11-21
@kursof

jsfiddle.net/ZQ5pu/90

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question