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

Raddatepicker color disappear on postback and mouseover

0 Answers 78 Views
Input
This is a migrated thread and some comments may be shown as answers.
sathies
Top achievements
Rank 1
sathies asked on 15 Feb 2010, 05:21 AM
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

No answers yet. Maybe you can help?

Tags
Input
Asked by
sathies
Top achievements
Rank 1
Share this question
or