Calendar Control Maximum and Minimum Date

Discussion in 'ASP .Net Web Controls' started by Dave Thomas, Jun 1, 2004.

  1. Dave Thomas

    Dave Thomas Guest

    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.


    Dave Thomas, Jun 1, 2004
    1. Advertisements

  2. 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.
    Alvin Bruney [MVP], Jun 1, 2004
    1. Advertisements

  3. Dave Thomas

    Dave Thomas Guest

    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?

    Dave Thomas, Jun 2, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.