New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Hide TimePopupButton on Server-side
Environment
Product | Telerik WebForms DateTimePicker for ASP.NET AJAX |
Description
Sometimes, one might want to hide the TimePopupButton from the DateTimePicker on the Server-side.
Solution
In order to hide the TimePopupButton on the Server-side, you can find the button and set its Visible
property to false
.
Example
C#
private void HideOnServer()
{
TimePopupButton timePopupButton = DateTimePicker1.Controls[0] as TimePopupButton; // Get the TimePopup control
if (timePopupButton != null)
{
timePopupButton.Visible = false;
}
}