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

Error in DisplayDateStart and DisplayDateEnd

6 Answers 205 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
THOMAS
Top achievements
Rank 1
THOMAS asked on 17 Nov 2011, 11:36 AM

Dear sir,

I have a problem with the RadDateTimePicker in Silverlight, when I use the DisplayDateStart and DisplayDateEnd. I bind the properties to my ViewModel:

<telerik:RadDateTimePicker SelectedDate="{Binding Path=BtExport.Stichtag, Mode=TwoWay}" InputMode="DatePicker" DateSelectionMode="Month" Margin="5,0,5,5" Width="150" HorizontalAlignment="Left" DisplayDateStart="{Binding BtExport.StartStichtag, Mode=OneTime}" DisplayDateEnd="{Binding BtExport.EndStichtag, Mode=OneTime}"/>

I set the BtExport.Stichtag to 17.11.2011, the BtExport.StartStichtag to 1.1.2010 and the BtExport.EndStichtag to 1.1.2020.

Problem 1.

The application cause an exception, (the date is out of range ?????)

Problem 2.

The DataBinding cause, that the BtExport.StartStichtag will be changed to 17.11.2010 (Error!!!) and the BtExport.EndStichtag will be changed to 17.11.2010 (Error!!!)

I think the control has a bug! Please check the SelectableDateStart and SelectableDateEnd, they work wrong too!



Best Regards!

6 Answers, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 22 Nov 2011, 02:44 PM
Hi Thomas,

I tried to reproduce this with the Q3 version of RadControls for Silverlight without any success. Could you please check the attached example and say if I am doing something wrong?

Regards,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
THOMAS
Top achievements
Rank 1
answered on 28 Nov 2011, 11:08 AM

You’re right, it works correct in the new Version Q3 2011.

Thank you!

0
jd d
Top achievements
Rank 1
answered on 04 Oct 2012, 05:36 PM
To the code snippet attached in previous post just use this in the view model constructor

this

 

 

.StartDate = DateTime.Now;

 

 

 

this.EndDate = new DateTime(2020, 1, 1);

 

 

 

this.SelectedDate =DateTime.Now;

It still throws the parser exception being talked about.

Basically this is a Valid situation , a user might have to be restricted to select only future dates and times from current Time,the default selection being current datetime, and similarly a user may need to be restricted to a select previous date and times,while the default selection wouldbe the current DateTime.

I have even trying add 1-2 minutes or hours just above of below current time to decrease startdate by some bit or increase end date by some ,but it continues to throw an exception.

Is there way out??Thanks in advance.

Warm Regards,
Joy

 

0
Ivo
Telerik team
answered on 10 Oct 2012, 10:20 AM
Hello Joy,

I tried to reproduce the exception using the code you provided. However I didn't have any success. You can find my project attached. Have I missed something? It would be great if you modify the project so it reproduces the exception and send it back to us.

Kind regards,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
jd d
Top achievements
Rank 1
answered on 10 Oct 2012, 08:56 PM
Ivo,

Thanks for the reply.

I tried using your last attachment referenced with Telerik controls version 2011.2.712.1040,and that attachement also threw the same run time exception.
I guess the issues was probably fixed henceforth.Can you please tell me which version is fine enough for this functionality with Silverlight 4.
I am using Silverlight 4,as cant move to Silverlight 5 due to other constraints.

 

 

 

Thanks again for your efforts.

Regards,
Joy
 

 

0
Ivo
Telerik team
answered on 15 Oct 2012, 09:49 AM
Hello Joy,

The first official release that includes a fix for this issue is Q3 2011.

Greetings,
Ivo
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DateTimePicker
Asked by
THOMAS
Top achievements
Rank 1
Answers by
Ivo
Telerik team
THOMAS
Top achievements
Rank 1
jd d
Top achievements
Rank 1
Share this question
or