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

Set Date on DateSelector Control from C# Code-Behind file

2 Answers 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jwan
Top achievements
Rank 1
Jwan asked on 16 May 2013, 08:30 PM
Hello

When my WP8 application starts, I want the date selector to show a certain date that is calculated based on today's date.

How can I do this? When I reference my control from the C# code behind file, and attempt to .setValue(), the parameters asked by the method are DependencyProperty and ObjectValue !! I was expecting the DateSelector to accept a Date or DateTime value !

Can someone please tell me how I can set the date on my DateSelector UI XAML Control from the code behind file?

Thank You.

2 Answers, 1 is accepted

Sort by
0
Jwan
Top achievements
Rank 1
answered on 16 May 2013, 08:32 PM
By the way, I have checked the documentation, it says nothing about setting the value, only getting it!
0
Accepted
Deyan
Telerik team
answered on 17 May 2013, 07:11 AM
Hi Jwan,

Setting the date on the Date Selector is done in the following way:

this.radDateSelector.SelectedValue = DateTime.Now;


Kind regards,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
General Discussions
Asked by
Jwan
Top achievements
Rank 1
Answers by
Jwan
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or