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

Setting selected dates in code

4 Answers 195 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Thorgeir
Top achievements
Rank 1
Thorgeir asked on 10 Sep 2008, 08:21 PM
Hi
How can I set selected dates in code?

- Thorgeir

4 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 11 Sep 2008, 11:56 AM
Hi Thorgeir,

If you are in SelectionMode=Single you can set selected date using calendar's SelectedDate property like:
RadCalendar calendar = new RadCalendar();  
calendar.SelectionMode = SelectionMode.Single;  
calendar.SelectedDate = new DateTime(2008, 7, 7); 

For other SelectionModes (Multiple and Extended) you should use the calendar's SelectedDates property like:
RadCalendar calendar = new RadCalendar();  
calendar.SelectionMode = SelectionMode.Extended;  
calendar.SelectedDates.Add(new DateTime(2008, 7, 7));  
calendar.SelectedDates.Add(new DateTime(2008, 7, 8));  
calendar.SelectedDates.Add(new DateTime(2008, 10, 10)); 

If you have other questions, we will be glad to help.


Sincerely yours,
Hristo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Prakash
Top achievements
Rank 1
answered on 24 Aug 2009, 07:17 AM
Control Name : RadDatePicker
Environment   : SilverLight with C#
Issue               : Currently datepicker control in my application date displays format taking from my machine regional date setting format.
                         How can i change customizes date format in raddatepicker control
                         Please help
0
Prakash
Top achievements
Rank 1
answered on 24 Aug 2009, 07:17 AM
Control Name : RadDatePicker
Environment   : SilverLight with C#
Issue               : Currently datepicker control in my application date displays format taking from my machine regional date setting format.
                         How can i change customizes date format in raddatepicker control
                         Please help
0
Valeri Hristov
Telerik team
answered on 25 Aug 2009, 01:53 PM
Hi Chennai MGL,

You should use the Culture property of RadDatePicker to customize the date format.

Kind regards,
Valeri Hristov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Calendar
Asked by
Thorgeir
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Prakash
Top achievements
Rank 1
Valeri Hristov
Telerik team
Share this question
or