Clear RadTimePicker's Value

3 posts, 1 answers
  1. vvvv
    vvvv avatar
    25 posts
    Member since:
    Aug 2011

    Posted 21 Jan 2014 Link to this post

    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. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 Jan 2014 Link to this post

    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.
  3. vvvv
    vvvv avatar
    25 posts
    Member since:
    Aug 2011

    Posted 22 Jan 2014 Link to this post

    Thanks Shinu. It worked. I wasn't adding the radTimepicker1 to the updated controls in ajax manager. So it wasn't clearing the input.
Back to Top