0

Example : Start Date : 4/08/12 End Date : 4/12/12 Submit button

I want to disable all dates from 4/0812 to 4/12/12 when Submit Button is clicked. I'm using asp.net c# and also when my Page is loaded and when the CalendarExtender is appearing again it the 4/08/12 to 4/12/12 can't be selected (disabled).

Example Database Dates 4/08/12 4/09/12 4/10/12 4/11/12 4/12/12

Those dates should be disabled.

I hope anyone can help me :| i'm new in using calendarExtender.

Thanks in advance

Carlo Adap
  • 53
  • 3
  • 8
  • Have a look at a previous answer of me on a similar question: http://stackoverflow.com/questions/5608062/how-to-disable-previous-dates-in-calendarextender-control-through-its-render-eve/5608560#5608560 – Tim Schmelter Aug 19 '12 at 10:43

1 Answers1

0

Have a look at this: Disable dates conditionally with Asp.net Ajax Calendar Extender

The other way to try to do this and its only an idea is to return a false on button click. In addition, you'll have to try to apply css to the ones you want disabled (to make them look disabled/grayed out) for which you'll have to dig down to see which styles you need to apply to which elements. And an obvious thing to remember is that you can't just rely only on client side validation because javascript could be disabled. So please make sure to add validations on server side as well.

Community
  • 1
  • 1
MaxDataSol
  • 358
  • 1
  • 2
  • 18