function pageLoad() { $(function () { $("#dp").datepicker({ dateFormat: 'dd/mm/yy', beforeShowDay: nextMonthFriday, onSelect: function (dateText, inst) { __doPostBack('DatePicker', '') } }); }) } function nextMonthFriday(date) { var d = new Date(); var d1 = new Date(); d = now.getDate(); var d2 = d.getDay(); if (d >= 15) { d1 = new Date(now.getFullYear(), now.getMonth() + 1, 1); d2 = d1.getDay(); return[(d2 == 5 && (d1.getDate() <= 7)),'']; } return [(false), '']; } function onlyFridays(date) { var day = date.getDay(); var d = date.getDate(); if (day == 5 ) return [(date <= FridayWeek()), '']; return [(false), '']; } function FridayWeek() { var d = new Date(); while (d.getDay() != 5) { d.setDate(d.getDate() + 1); } d.setDate(d.getDate() + 7); return d; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)