-
Notifications
You must be signed in to change notification settings - Fork 292
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kb(datetimepicker): add kb hide timepopup on server side closes teler…
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
knowledge-base/datetimepicker-hide-timepopupbutton-on-server-side.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
title: Hide TimePopupButton on Server-side | ||
description: Learn how to hide TimePopupButton on Server-side | ||
type: how-to | ||
page_title: Hide TimePopupButton on Server-side. | DateTimePicker | ||
slug: datetimepicker-hide-timepopupbutton-on-server-side | ||
res_type: kb | ||
ticketid: 1636615 | ||
--- | ||
|
||
## Environment | ||
|
||
<table> | ||
<tr> | ||
<td>Product</td> | ||
<td>Telerik WebForms DateTimePicker for ASP.NET AJAX</td> | ||
</tr> | ||
</table> | ||
|
||
## 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; | ||
} | ||
} | ||
```` | ||
````VB | ||
Private Sub HideOnServer() | ||
Dim timePopupButton As TimePopupButton = TryCast(DateTimePicker1.Controls(0), TimePopupButton) | ||
|
||
If timePopupButton IsNot Nothing Then | ||
timePopupButton.Visible = False | ||
End If | ||
End Sub | ||
```` | ||
|
||
|
||
|
||
|
||
|