0

in my application using jquery date picker,my problem is in ui customer select the date , customer select the weekends(satuardays, sundays) and USA holidays(01-01-2011 etc- but year changed based on pc date) disabled (not selected). i am writing code like this

$(function () {
$('#txtPaymentDate').datepick({ onDate: $.datepick.noWeekends, showTrigger: '#calImg'
});
});
Erik
  • 935
  • 11
  • 28
hmk
  • 969
  • 10
  • 38
  • 70

1 Answers1

1
$("#datepicker").datepicker({ beforeShowDay: $.datepicker.noWeekends });

From the docs: http://docs.jquery.com/UI/Datepicker/noWeekends

marto
  • 4,402
  • 25
  • 15
  • @hmk then create use beforeShowDay to call a funciton strips out weekends and holidays http://stackoverflow.com/questions/501943/can-the-jquery-ui-datepicker-be-made-to-disable-saturdays-and-sundays-and-holida – marto Jul 22 '11 at 09:30
  • ok all ready saw that link but it is not working how to add the showTrigger: '#calImg'(it is a image) in that code pls help me – hmk Jul 22 '11 at 09:37