0

If you have used Calendar Extender, i am looking for ways to disable dates based on selection from another calendar selected date. In a project management application there are end and start dates, i am looking for ways to validate these on client. Someways would require postback which i am not willing to perform. There seems to be StartDate and EndDate properties for the calendar on the server, but does not seem to have any client side counterparts. Have you got any ideas how i can perform this.

Deeptechtons
  • 10,945
  • 27
  • 96
  • 178
  • There is no way to disable dates in a CalendarExtender. You should use a RangeValidator to validate the selected date on client(and server)side. Additionally you could use javascript and handle the `OnClientDateSelectionChanged` http://stackoverflow.com/a/6550393/284240 – Tim Schmelter Jan 03 '12 at 11:01
  • @TimSchmelter but sure there must be some client function that disables the dates,example link i provided in question shows one. But sadly i work on `Asp.net 2.0` so no `StartDate` and `EndDate` properties for my version. Least i can i validate with custom validator on client side. – Deeptechtons Jan 03 '12 at 11:13

2 Answers2

1

I know it's too late to reply this post but it my help someone

Disable dates in Ajax Calendar Extender with different dates examples

Bingo
  • 51
  • 2
  • 8
  • Giving only link as answer is not a good way. Incase the link was change/update/removed, you answer will become invalid automatically. The best practice is to explain the answer a little and then give the link as reference. – Sankumarsingh Aug 26 '13 at 19:18
0

You can overwrite _cell_onclick javascript event to show an alert if a wrong date is chosen depending on the selected date in the other calendar.

Here is an example: Ajaxtoolkit Calendar Extender close button and date restriction

Răzvan Flavius Panda
  • 21,730
  • 17
  • 111
  • 169