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

How to Find and Set Date in RadCalendar

4 Answers 168 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kristine
Top achievements
Rank 2
Kristine asked on 06 Jul 2010, 10:39 AM
Hi,

Is there a simple way on how to set the date in a Silverlight RadCalendar? For example, my date is 2010/06/30, how can I set this in the calendar?

Regards,
QA Tester

4 Answers, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 07 Jul 2010, 05:17 PM
Hello QA,

You want to set the date to RadCalendar or record a test where by clicking you navigate to this date? I will need some more info about what you are trying to achieve. If you want to set the date in the RadCalendar in your SIlverlight application you can set SelectedDate="2010-06-30" . If you want to record a test just click record navigate to the desired date and select it.

Regards,
Boyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kristine
Top achievements
Rank 2
answered on 08 Jul 2010, 02:47 AM
Hi Boyan,

I did a recording setting the date in the RadCalendar to 2010-06-30. But I want this date to be dynamic, so I created a coded step that will generate a random date, and then input this date in the RadCalendar. Is this possible?

Regards,
QA
0
Accepted
Boyan
Telerik team
answered on 09 Jul 2010, 03:37 PM
Hi QA,

It is not possible to set the SelectedDate as a property of the RadCalendar. Here is what you can do. The translators for Telerik controls allow you to record user interactions. You can use a data driven test like shown in this video: http://www.artoftest.com/community/datadriven/datadrive-test.aspx .

The thing is that you will need to write some code that compares the current view with the date you wish to select. Then use : calendar.ViewUp();   calendar.SelectMonth("Apr");    etc..
 For example the calendar is showing  April 2010, you wish to select  15.05.2010. Compare 04 to 05 and see that this is next month. Then:
calendar.ScrollRight();
calendar.SelectDay("15");

This will go to next month and then select 15.

Let me know if you need more help.

Greetings,
Boyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kristine
Top achievements
Rank 2
answered on 16 Jul 2010, 09:50 AM
Hi Boyan,

I think I am now able to make it work. You're right, I need to write some code. Thanks!

Regards,
QA
Tags
General Discussions
Asked by
Kristine
Top achievements
Rank 2
Answers by
Boyan
Telerik team
Kristine
Top achievements
Rank 2
Share this question
or