This is a migrated thread and some comments may be shown as answers.

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

3 Answers 208 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rich Gouette
Top achievements
Rank 1
Rich Gouette asked on 16 Nov 2009, 08:34 PM

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

 

3 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 19 Nov 2009, 01:37 PM
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.
0
Rich Gouette
Top achievements
Rank 1
answered on 19 Nov 2009, 02:34 PM
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
0
Kaloyan
Telerik team
answered on 24 Nov 2009, 11:26 AM
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.
Tags
Calendar
Asked by
Rich Gouette
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Rich Gouette
Top achievements
Rank 1
Share this question
or