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

Client-side PopupButton disable Issue

2 Answers 43 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Niko
Top achievements
Rank 2
Niko asked on 13 Oct 2008, 08:42 AM
 I Server-Side Write
dtpDateUpdatedFrom.DatePopupButton.Enabled =
false;

How to Client-Side Enabled  it?

thinks!

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Oct 2008, 07:20 AM
Hi Niko,

Try the following Javascript code.

ASPX:
<telerik:RadDatePicker ID="RadDatePicker3"   runat="server" > 
          <ClientEvents   OnPopupOpening="PopupOpening" /> 
        </telerik:RadDatePicker> 
 
         <button onclick="ToggleDatePicker(true)">enable</button> 
         <button onclick="ToggleDatePicker(false)">disable</button> 

JS:
 <script type="text/javascript" language="javascript"  > 
      var isEnable = true
    function ToggleDatePicker(enable)  
    {  
        var DatePicker = $find('<%= RadDatePicker3.ClientID %>');  
        isEnable =  enable
        if (!enable)  
            DatePicker.get_dateInput().disable();   
        else  
            DatePicker.get_dateInput().enable();   
    }      
    function PopupOpening(sender, args) 
    { 
        args.set_cancel(!isEnable); 
    } 
      
   
    </script> 


Thanks
Shinu.
0
Niko
Top achievements
Rank 2
answered on 15 Oct 2008, 02:55 AM
thank you! 
I had to do.
Tags
Calendar
Asked by
Niko
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Niko
Top achievements
Rank 2
Share this question
or