New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Hide TimePopupButton on Server-side


Product Telerik WebForms DateTimePicker for ASP.NET AJAX


Sometimes, one might want to hide the TimePopupButton from the DateTimePicker on the Server-side.


In order to hide the TimePopupButton on the Server-side, you can find the button and set its Visible property to false.


private void HideOnServer()
    TimePopupButton timePopupButton = DateTimePicker1.Controls[0] as TimePopupButton; // Get the TimePopup control 

    if (timePopupButton != null)
        timePopupButton.Visible = false;
Private Sub HideOnServer()
    Dim timePopupButton As TimePopupButton = TryCast(DateTimePicker1.Controls(0), TimePopupButton)

    If timePopupButton IsNot Nothing Then
        timePopupButton.Visible = False
    End If
End Sub
In this article