Redraw Calendar

2 posts, 0 answers
  1. Kevin
    Kevin avatar
    1 posts
    Member since:
    Jul 2011

    Posted 01 Feb Link to this post

    I have a few rad buttons that set radCalendar1.selectedDate = "Some date" (+-1 day, +-7 days, +-1 month). The code works and the calendar does highlight the correct day but I can't see the selected date if it is in a different month/view. Is there a way to refresh the calendar view/display to update to the radCalendar1.selectedDate?
  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 03 Feb Link to this post

    Hello,

    I tested the behavior, however, the correct month is displayed after changing the date on my end. I used the scenario from the snippets below for testing.


    <telerik:RadScriptBlock runat="server" ID="RadCodeBlock1">
        <script type="text/javascript">
            function clientClick() {
                var picker = $find("<%= RadDatePicker1.ClientID %>");
                picker.set_selectedDate(new Date(2016, 3, 3));
            }
        </script>
     
    </telerik:RadScriptBlock>
     
    <asp:Button Text="Set date" runat="server" OnClientClick="clientClick(); return false;" />
     
    <telerik:RadDatePicker runat="server" ID="RadDatePicker1"></telerik:RadDatePicker>


    Let me know if this approach is working for you. Also, please describe what is different in your scenario.

    Regards,
    Viktor Tachev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top