set_selectedDate not saving after postback

18 posts, 1 answers
  1. Answer
    Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 09 Apr 2009 Link to this post

    I first set the values server side on not postback.

    tcCalEnd.DateFrom = Date.Now().AddMonths(-6)
    tcCalEnd.DateSelected = Date.Now()

    Then when I click a radio button via javascript I run the function on the client side
    var datePickerTo = $find("ctl00_cphBody_tcCalEnd_RadDatePicker1");              
    datePickerTo.set_maxDate(MaxDate);
    datePickerTo.set_minDate(MinDate);
    datePickerTo.set_selectedDate(MaxDate);

    The value in the input box is the date from the client side function. 

    But when I click submit - the value from the raddatepicker is set to the original serverside values.  It doesn't save the client side values.  Which I ran after the serverside.  Is there something else I have to do to save it?



  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 10 Apr 2009 Link to this post

    Hello Jomey,

    Please download the attached example and let me know the exact steps needed to reproduce the reported issue.

    Thank you for your cooperation

    Regards,
    Daniel
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 10 Apr 2009 Link to this post

    I was able to duplicate the issue.  I added min and max date to both javascript and server.  Those are the ones causing the problem.

    So if you click on Set date / Server, then click on Set date / Client, then click on submit.  It reverts back to server date.  Need it to stay on client max, min, and selected date after hitting submit.

    Default.aspx
    Changed the setDate() function

     <script type="text/javascript" language="javascript">
                function setDate()
                {
                    datePickerTo = $find('<%= RadDatePicker1.ClientID %>');
                    datePickerTo.set_maxDate(new Date('2009/04/10'));
                    datePickerTo.set_minDate(new Date('2007/04/10'));
                    datePickerTo.set_selectedDate(new Date('2007/04/10'));
                    return false;
                }
            </script>

    Default.aspx.cs
     protected void button1_serverclick(object sender, EventArgs e)
        {
            RadDatePicker1.MaxDate = DateTime.Now;
            RadDatePicker1.MinDate = DateTime.Now.AddMonths(-6);
            RadDatePicker1.SelectedDate = DateTime.Now.AddMonths(-6);
        }

    The client min and max date are not overwriting the server min and max date -- it still thinks the min and max date are the ones set by the server side button.
  4. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 13 Apr 2009 Link to this post

    Any solution?

    The only reason I need server side code is because on page load the 1st time... I the raddatepicker is null via client side script.

    var datePickerTo = $find("ctl00_cphBody_tcCalEnd_RadDatePicker1");              
    datePickerTo.set_maxDate(MaxDate);
    datePickerTo.set_minDate(MinDate);
    datePickerTo.set_selectedDate(MaxDate);
  5. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 14 Apr 2009 Link to this post

    Hello Jomey,

    Excuse us for the late answer. We successfully reproduced the issue. I want to assure you that our developers will investigate the case as soon as possible.

    I will notify you when I have more information on the subject.

    Best regards,
    Daniel
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  6. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 16 Apr 2009 Link to this post

    Thanks.  Is it possible to get a solution this week?
  7. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 22 Apr 2009 Link to this post

    Hello Jomey,

    I have no information on this issue yet. I assure you that you will be notified as soon as I have any news regarding this case.

    Regards,
    Daniel
    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.
  8. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 24 Apr 2009 Link to this post

    thx looking forward to the solution
  9. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 18 May 2009 Link to this post

    Any updates on this?
  10. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 21 May 2009 Link to this post

    Hello Jomey,

    The problem is added to our product backlog but we don't have a resolution yet. I will let you know when we have more information.

    Excuse us for the inconvenience.

    Regards,
    Daniel
    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.
  11. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 13 Jul 2009 Link to this post

    Nothing yet?
  12. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 16 Jul 2009 Link to this post

    Hello Jomey,

    The issue is already fixed. You will be able to download a hotfix as soon as our QA team finish the tests.

    Best regards,
    Daniel
    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.
  13. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 13 Aug 2009 Link to this post

    Thx can you let me know when QA is done?
  14. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 05 Oct 2009 Link to this post

    Any updates?
  15. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 06 Oct 2009 Link to this post

    Hi Jomey,

    The problem is fixed in our latest service pack. You can read more details on how to upgrade here. Let us know if you encounter any problems.

    Kind regards,
    Pavel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  16. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 14 Oct 2009 Link to this post

    I can't download the fix.  Can you send me the updated dll?  The version I'm using is 2008.2.723.20
  17. Jomey
    Jomey avatar
    60 posts
    Member since:
    Jan 2008

    Posted 09 Nov 2009 Link to this post

    Which version do I download that has the fix?
  18. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 10 Nov 2009 Link to this post

    Hi Jomey,

    The versions after Q2 2009 SP1 (2009.2.826) should have the fix in them. Note that if you are using SharedCalendar and want to try the Q3 2009 release, it is recommended to get the latest internal build, as there is in issue with the officially released version.

    Best wishes,
    Pavel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top