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.

    Thanks

    Dave
     
    Dave Thomas, Jun 1, 2004
    #1
    1. Advertising

  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.

    --
    Regards,
    Alvin Bruney
    [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
    Got tidbits? Get it here... http://tinyurl.com/27cok
    "Dave Thomas" <> wrote in message
    news:...
    > 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
     
    Alvin Bruney [MVP], Jun 1, 2004
    #2
    1. Advertising

  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?



    "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:<O8WBW8#>...
    > 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" <> wrote in message
    > news:...
    > > 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
     
    Dave Thomas, Jun 2, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    568
    Chris Taylor
    Mar 13, 2006
  2. Joey
    Replies:
    2
    Views:
    808
  3. Replies:
    7
    Views:
    364
    Keith Thompson
    Sep 16, 2007
  4. Replies:
    8
    Views:
    816
    Ben Bacarisse
    Oct 19, 2008
  5. Peng Yu
    Replies:
    16
    Views:
    472
    Philip Potter
    Jan 31, 2010
Loading...

Share This Page