tags:

views:

631

answers:

1

Is there a way to limit the date range with ASP.net calendar extender?

For example, i have a calendar extender attach to a text box that is a "Start Date" for user to pick then another text box call "End Date" with calendar extender.

When a user pick the Start Date to be 5/31/2009 then the End Date can only be 30 days from 5/31/2009 that is 6/27/2009. No matter what date the user pick the user can only pick the End Date within 30 days of Start Date.

A: 

No, you can't. Though, you can:

  1. Add RangeValidator to validate range (not restricting, but telling user he is wrong :)) - http://www.dotnetcurry.com/ShowArticle.aspx?ID=149

  2. Use MaskedEdit as described here: http://forums.asp.net/p/1205865/2112772.aspx#2112772

Ivan Suhinin
That's what i end up doing.
Jack

related questions