Hi All,
We are having some difficulties on clearing RadDatePicker selected values. We have multiple RadDatePicker on our page and we want to clear its selected date to NULL or empty its input box, we already tried filtering RadDatePicker, DatePickingInput and RadDateInput with no success.
"No problem on JavaScript but we need to do it on server side"
Sample Code:
Thanks for any help!
We are having some difficulties on clearing RadDatePicker selected values. We have multiple RadDatePicker on our page and we want to clear its selected date to NULL or empty its input box, we already tried filtering RadDatePicker, DatePickingInput and RadDateInput with no success.
"No problem on JavaScript but we need to do it on server side"
Sample Code:
public
void
ResetFormControlValue(Control parent)
{
foreach
(Control c
in
parent.Controls)
{
if
(c.Controls.Count > 0)
{
ResetFormControlValue(c);
}
else
{
switch
(c.GetType().ToString())
{
case
"Telerik.Web.UI.RadNumericTextBox"
:
break
;
case
"Telerik.Web.UI.RadTextBox"
:
break
;
case
"Telerik.Web.UI.DatePickingInput"
:
// Clear all RadDatePicker
((RadDateInput)c).Clear();
break
;
}
}
}
}
Thanks for any help!