Raddatepicker color disappear on postback and mouseover

1 posts, 0 answers
  1. sathies
    sathies avatar
    37 posts
    Member since:
    Oct 2008

    Posted 14 Feb 2010 Link to this post

    Hi,
    I have checkbox and raddatepicker. I want to change the color of raddatepicker input  based on checkbox. Shinu provided me a solution  below

    <telerik:RadDatePicker ID="RadDatePicker13" runat="server"> 
    </telerik:RadDatePicker> 
    <asp:CheckBox ID="CheckBox1" runat="server" onclick="checkedChanged(this);" /> 

    function checkedChanged(checkbox) { 
            var datepicker = $find("<%=RadDatePicker13.ClientID%>"); 
            if (checkbox.checked) { 
                datepicker.get_dateInput()._textBoxElement.style.backgroundColor = "yellow"; 
            } 
            else { 
                datepicker.get_dateInput()._textBoxElement.style.backgroundColor = "white"; 
            } 
        } 


    Its works fine.But the above doesnot work when there is a asychnorous postback of other control in the same page or mouseover of raddatepicker.
    Please provided me  a solution.


    regards
    sathies

Back to Top