3

I am working on hrm related site I have face one problem that uploading attending sheet select jquery date picker calender date. In calander require not select sunday date for upload attendance sheet.

please help how to disable sunday date in jquery datepicker ?

Erik
  • 935
  • 11
  • 28
tailor
  • 366
  • 3
  • 6
  • 20

2 Answers2

8

You have to use beforeShowDate event of DatePicker like below:

$("#textboxid").datepicker({
beforeShowDay: function(date) {
var day = date.getDay();
return [day != 0,''];
}
})​​​​​;​
Sarcastic
  • 677
  • 5
  • 14
6

Hope something like this may help u mate... :)

$('#noSunday').datepicker({ 
        beforeShowDay: noSunday, 
 }); 

      function noSunday(date){ 
         return [date.getDay() != 0, ''];
      }; 

Fiddle

http://jsfiddle.net/zXFGN/

Nibin
  • 3,922
  • 2
  • 20
  • 38