Start Validating calendar dates in textbox asp

Validating calendar dates in textbox asp

Sometimes we need validation for date, that user can only put the date in textbox.

To avoid the postback, use a HTML Image Control instead of the Server side Image Control as shown below: In case you are clicking on the textbox to open the calendar, then in earlier versions of the toolkit, the calendar would not hide automatically when the user clicked anywhere outside the Calendar control. In fact, in the latest version, the Calendar hides automatically when a date is selected.

NET AJAX control that is associated with a Text Box control.

When the user clicks on the Text Box, a client-side Calendar control pops up.

If you plan to do this programmatically, here’s some code for you.