Client-side PopupButton disable Issue

3 posts, 0 answers
  1. Niko
    Niko avatar
    19 posts
    Member since:
    Apr 2008

    Posted 13 Oct 2008 Link to this post

     I Server-Side Write
    dtpDateUpdatedFrom.DatePopupButton.Enabled =
    false;

    How to Client-Side Enabled  it?

    thinks!
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 14 Oct 2008 Link to this post

    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.
  3. Niko
    Niko avatar
    19 posts
    Member since:
    Apr 2008

    Posted 14 Oct 2008 Link to this post

    thank you! 
    I had to do.
Back to Top