How do I constrain the Dates to a range usin the DatePicker?

4 posts, 0 answers
  1. Rich Gouette
    Rich Gouette avatar
    12 posts
    Member since:
    Nov 2009

    Posted 16 Nov 2009 Link to this post

    I'm using 

     

    DisplayMode

    ="DecadeView"
    But, I would like for the picker to start off by default, showing the years 1900 through 2010, and in the zoomed-out mode: meaning
    the Header would show "1900" and the date year ranges displayed would start at 1890-1900 and end with the 2000-2010 range.

    I'm just not seeing documentation as to how I can go about this, or if it's doable..though I suspect it is.

    Thanks fellas,
    Rich

     

  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 19 Nov 2009 Link to this post

    Hello Rich Gouette,

    The properties you need are: DisplayDate, DisplayDateStart, DisplayDateEnd. Check the posted code:
    public RadDatePickerTest()
            {
                InitializeComponent();
     
                radDatePicker.DisplayDate = new DateTime(1900, 1, 1);
                radDatePicker.DisplayDateStart = new DateTime(1890, 1, 1);
                radDatePicker.DisplayDateEnd = new DateTime(2010, 1, 1);
            }
    Best wishes,
    Kaloyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Rich Gouette
    Rich Gouette avatar
    12 posts
    Member since:
    Nov 2009

    Posted 19 Nov 2009 Link to this post

    Thanks much for th e reply.
    I can use those settings as well, but did want to see if this is possible to set as the default when the date
    picker comes up:

    http://www.gouette.com/images/date.JPG

    Thanks,
    Rich
  5. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 24 Nov 2009 Link to this post

    Hello Rich Gouette,

    You can try setting the DisplayMode property to "CenturyView". 

    Greetings,
    Kaloyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top