Calendar Control Maximum and Minimum Date

D

Dave Thomas

Is there a way of setting a maximum date which a user can select for
the webcontrols calendar control? The only work around I have is to
validate what date the user selects and post an error if it is beyond
the maximum date I require which is annoying for the user.

Thanks

Dave
 
A

Alvin Bruney [MVP]

Nope,
but you can get around that by removing the maximum and minimum dates which
are visible to the user. If they can't see it, they can't select it and
there is no need for validation code. To make it invisible, you would set
the font size to 1px and the background and foreground color would need to
be set to match the calendar background.
 
D

Dave Thomas

Thanks Alvin. I'll give that a try.
As a follow up does anyone know the reason why setting minimum or
maximum dates is not allowed on this control?



Alvin Bruney said:
Nope,
but you can get around that by removing the maximum and minimum dates which
are visible to the user. If they can't see it, they can't select it and
there is no need for validation code. To make it invisible, you would set
the font size to 1px and the background and foreground color would need to
be set to match the calendar background.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Dave Thomas said:
Is there a way of setting a maximum date which a user can select for
the webcontrols calendar control? The only work around I have is to
validate what date the user selects and post an error if it is beyond
the maximum date I require which is annoying for the user.

Thanks

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top