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

set_selectedDate not saving after postback

17 Answers 250 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jomey
Top achievements
Rank 1
Jomey asked on 10 Apr 2009, 02:25 AM
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?



17 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 10 Apr 2009, 08:43 AM
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.
0
Jomey
Top achievements
Rank 1
answered on 10 Apr 2009, 05:21 PM
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.
0
Jomey
Top achievements
Rank 1
answered on 14 Apr 2009, 12:20 AM
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);
0
Daniel
Telerik team
answered on 14 Apr 2009, 11:02 AM
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.
0
Jomey
Top achievements
Rank 1
answered on 16 Apr 2009, 05:03 PM
Thanks.  Is it possible to get a solution this week?
0
Daniel
Telerik team
answered on 22 Apr 2009, 04:13 PM
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.
0
Jomey
Top achievements
Rank 1
answered on 24 Apr 2009, 11:06 PM
thx looking forward to the solution
0
Jomey
Top achievements
Rank 1
answered on 18 May 2009, 10:29 PM
Any updates on this?
0
Daniel
Telerik team
answered on 21 May 2009, 04:31 PM
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.
0
Jomey
Top achievements
Rank 1
answered on 13 Jul 2009, 11:15 PM
Nothing yet?
0
Daniel
Telerik team
answered on 16 Jul 2009, 04:03 PM
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.
0
Jomey
Top achievements
Rank 1
answered on 13 Aug 2009, 06:17 PM
Thx can you let me know when QA is done?
0
Jomey
Top achievements
Rank 1
answered on 05 Oct 2009, 06:11 PM
Any updates?
0
Pavel
Telerik team
answered on 06 Oct 2009, 01:09 PM
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.
0
Jomey
Top achievements
Rank 1
answered on 14 Oct 2009, 06:32 PM
I can't download the fix.  Can you send me the updated dll?  The version I'm using is 2008.2.723.20
0
Jomey
Top achievements
Rank 1
answered on 09 Nov 2009, 10:25 PM
Which version do I download that has the fix?
0
Pavel
Telerik team
answered on 10 Nov 2009, 08:34 AM
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.
Tags
Calendar
Asked by
Jomey
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Jomey
Top achievements
Rank 1
Pavel
Telerik team
Share this question
or