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

Month Year RadDatePicker

3 Answers 60 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Zach
Top achievements
Rank 1
Zach asked on 10 Jul 2009, 03:54 PM
I implemented this Month Year picker and it works great.  Does exactly what I need.

However, the problem I am running into is this, when a postback occurs, the month/year functionality is lost and the raddatepicker returns to the default settings.  Does anyone know how to keep those settings after a postback or how to call the function 

SetCalendarTable() each time a postback occurs.  I tried numerous ways to call that function with no success.

I have two of these calendars in a panel that is ajaxified.  Don't know if that makes any difference.

Thanks,
Zach

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 13 Jul 2009, 03:06 PM
Hello Zach,

Please note that project in the link provided by you has been updated.
I tried the new version and it does not lose the month / year functionality after a postback.
I suggest you trying this project and if you still need assistance please write back to us.

Regards,
Martin
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
Zach
Top achievements
Rank 1
answered on 13 Jul 2009, 04:04 PM
Unfortunately that did not help.  As I stated in my initial post, the two calendars I have are in an ajaxified panel.  I placed the two calendars outside of the panel and now they work, even after a postback.

This workaround wil do just fine for me, but if you now as to why this still occurs in an ajaxified panel, I would still like to know.

Thanks,
Zach
0
Martin
Telerik team
answered on 16 Jul 2009, 07:42 AM
Hello Zach,

I would suggest you to modify the javascript code in the sample project of our code library.
In case you are using a standard UpdatePanel you can change the window.onload function to pageLoad like this:
pageLoad = function() 
                { 
                    window.setTimeout(function() { setCalendarTable(); }, 200) 
                } 

In case you use RadAjaxPanel in addition to the above improvement you will also need to embed the entire "script" tag in RadCodeBlock like this:

<telerik:RadCodeBlock ID="RadCodeBlock" runat="server"
 
            <script type="text/javascript"
                .... 
            </script> 
 
        </telerik:RadCodeBlock> 

Please let us know if these changes work in your case.

Regards,
Martin
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.
Tags
Calendar
Asked by
Zach
Top achievements
Rank 1
Answers by
Martin
Telerik team
Zach
Top achievements
Rank 1
Share this question
or