This is a migrated thread and some comments may be shown as answers.

Clear RadTimePicker's Value

2 Answers 124 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
vvvv
Top achievements
Rank 1
vvvv asked on 21 Jan 2014, 07:11 PM
How to clear RadTimePicker's value on submit of a button?
I am able to clear the RadDatePicker value by RadDatePicker.SelectedDate=null; But it doesnt work with timepicker. I tried all the below ones. None of them work.
RadTimePicker1.clear();
RadTimePicker1.DateInput.Clear();
RadTimePicker1.SelectedDate.Value =null;

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 22 Jan 2014, 03:28 AM
Hi,

Unfortunately I couldn't replicate the issue at my end. Please have a look into the following code snippet which works fine at my end.

ASPX:
<telerik:RadTimePicker ID="RadTimePicker1" runat="server">
</telerik:RadTimePicker>
<telerik:RadButton ID="RadButton1" runat="server" Text="Submit" OnClick="RadButton1_Click">
</telerik:RadButton>

C#:
protected void RadButton1_Click(object sender, EventArgs e)
{
    RadTimePicker1.Clear();
}

Please provide your code if it doesn't help.
Thanks,
Shinu.
0
vvvv
Top achievements
Rank 1
answered on 22 Jan 2014, 05:46 PM
Thanks Shinu. It worked. I wasn't adding the radTimepicker1 to the updated controls in ajax manager. So it wasn't clearing the input.
Tags
General Discussions
Asked by
vvvv
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
vvvv
Top achievements
Rank 1
Share this question
or