Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Beta Forum > How to enable and disable TimePopupButton of RadDateTimePicker in javasciprt?

Not answered How to enable and disable TimePopupButton of RadDateTimePicker in javasciprt?

Feed from this thread
  • deepak avatar

    Posted on Mar 3, 2011 (permalink)

    Hi,
    I have got a RadDateTimePicker.
    <telerik:RadDateTimePicker ID="RadDateTimePickerStartDate" runat="server" SelectedDate='<%#Eval("StartDate") %>' Skin="Vista">
           <TimePopupButton Enabled="false" />
     </telerik:RadDateTimePicker>
    I am able to enable and disable TimePopupButton as shown above.But i want to enable or disable the TimePopupButton through javascript.Is there anyway to do this?

    Thanks in advance.....

    Reply

  • Posted on Mar 3, 2011 (permalink)

    Hello Deepak,

    You can try the following client side code to achieve the same.

    ClientSide:
    function DisablePopUpButton()
        {
          datepicker = $find("<%= RadDateTimePicker1.ClientID %>");
          datepicker.get_timePopupButton().disabled = true;
          datepicker.get_timePopupButton().click(null);
       }

    aspx:
    <telerik:RadDateTimePicker ID="RadDateTimePicker1" runat="server" onCalendar-WeekendDayStyle-BackColor="Red">
    </telerik:RadDateTimePicker>
    <input id="Button1" type="button" value="Disable" onclick="DisablePopUpButton();" />

    Thanks,
    Shinu.

    Reply

  • deepak avatar

    Posted on Mar 3, 2011 (permalink)

    Hi Shinu,

    I have tried this code.But time pop up button got not disabled and also got script error for timePicker.get_timePopupButton().click(null);

    Thanks for replying....

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Beta Forum > How to enable and disable TimePopupButton of RadDateTimePicker in javasciprt?