Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1249
  • Last Modified:

Validation for AJAX Calendar Control - ASP.NET C#

Hi,

I am using AJAX Calendar Extender in my webpage.

I want to add validation that users cannot select future dates when they click this calender.

How can I do this?

NOTE: The validation should happen when the date is selected in the calender and not when the date is populated in the textbox.

Thanks!
0
meetpd
Asked:
meetpd
2 Solutions
 
KrummelzCommented:
The Caledar Extender has a OnClientDateSelectionChanged Event which you can find under the extender's properties in design view. (its not under the events tab in the properties window). You can use that to just check that the date is greater than today's date, and if so, handle the problem.
0
 
Muhammad Ousama GhazaliSolution Analyst & ArchitectCommented:
Please check the following link on a detailed discussion on limiting the Calendar for certain dates. Perhaps it may help to acheive your requirements:
http://www.karpach.com/ajaxtoolkit-calendar-extender-tweaks.htm
 
0
 
devnewbeeCommented:
I appreciate the responses.  I am actually want to find a solution that simply looks at a date, and checks to see if it is a weekend or holiday and subtract 28 working days accordingly.  It seems staright forward, but I am trying to find a solution that is easy to admisiter and willnot require a DB table to be maintained in the middle of it all.

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now