0

I am using Jquery Datepicker. In on of my module (PHP) when i am trying to add package details i need to show the date picker with already selected dates in other color. So that admin will not use those selected dates for new package.

Please help me. Thanks in advance.

Regards, Prabu

Hobo
  • 7,536
  • 5
  • 40
  • 50
Prabu
  • 384
  • 1
  • 3
  • 14

1 Answers1

2

I'm not clear on whether you're trying to limit the selection to a specific date range, or whether you want to disable arbitrary dates within a range.

If it's the former, you should be able to specify minDate and maxDate when initialising datepicker. See here.

If the latter, you should be able to use the beforeShowDay option. There's a nice explanation on this question. The second element of the return value is a class name - using that with some corresponding CSS will allow you to see the colour. You can stop it being selected at all by returning false as the first element of the return value.

Community
  • 1
  • 1
Hobo
  • 7,536
  • 5
  • 40
  • 50
  • to make you clear the person should add the same date which is already added. so i wanted to show it in the datepicker itself that those dates are already blocked. – Prabu Dec 18 '11 at 09:51