Error in DisplayDateStart and DisplayDateEnd

7 posts, 0 answers
  1. THOMAS
    THOMAS avatar
    12 posts
    Member since:
    Jan 2011

    Posted 17 Nov 2011 Link to this post

    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!

  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 22 Nov 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. THOMAS
    THOMAS avatar
    12 posts
    Member since:
    Jan 2011

    Posted 28 Nov 2011 Link to this post

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

    Thank you!

  5. jd d
    jd d avatar
    2 posts
    Member since:
    Oct 2009

    Posted 04 Oct 2012 Link to this post

    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

     

  6. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 10 Oct 2012 Link to this post

    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.

  7. jd d
    jd d avatar
    2 posts
    Member since:
    Oct 2009

    Posted 10 Oct 2012 Link to this post

    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
     

     

  8. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 15 Oct 2012 Link to this post

    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.

Back to Top
DevCraft banner