datepicker ranges

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

datepicker ranges

featherwebdiva
I have a datepicker, where selectable dates should be only Fridays and Saturdays every other week.

This function shows every FRiday and Saturday as being selectable, but I need it to be every other.

beforeShowDay: function(date) {
        var day = date.getDay();
        return [(day > 4 && day < 7)];
    }

My idea was to set a start point date and get the time span between the two dates, and then see if dividing by 14 days results in an integer, but I'm doing something wrong.  Please help.