set default DateTime in RadDateTimePicker

4 posts, 1 answers
  1. Hadoop
    Hadoop avatar
    8 posts
    Member since:
    Jun 2015

    Posted 16 Jun 2015 Link to this post

    Language : : C#, ASP.NET

    How can I set default DateTime value in RadDateTimePicker. Default value should be one day greater than the current date with time as "12:00 AM". How can I do this?

  2. Answer
    Viktor Tachev
    Viktor Tachev avatar
    1882 posts

    Posted 19 Jun 2015 Link to this post


    In order to implement the behavior you can handle the Load event of the RadDateTimePicker and set the appropriate date.

    <telerik:RadDateTimePicker runat="server" ID="RadDateTimePicer1" OnLoad="RadDateTimePicer1_Load"></telerik:RadDateTimePicker>

    protected void RadDateTimePicer1_Load(object sender, EventArgs e)
        (sender as RadDateTimePicker).SelectedDate = DateTime.Today.AddDays(1);

    Viktor Tachev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Adam
    Adam avatar
    4 posts
    Member since:
    Feb 2015

    Posted 22 Dec 2017 in reply to Viktor Tachev Link to this post

    How about if the RadDateTimePicker is inserted in a <GridDateTimeColumn> e.g.

    <telerik:GridDateTimeColumn DataField="StartDate" PickerType="DateTimePicker" SortExpression="StartDate" UniqueName="StartDate" />


    How can we set a default datetime for the picker then? I just want to default the picker to NOW()

  4. Eyup
    Eyup avatar
    3387 posts

    Posted 26 Dec 2017 Link to this post

    Hello Adam,

    If you mean the inserting form, then you can directly use the following property to achieve that:
    <telerik:GridDateTimeColumn ... DefaultInsertValue="5/5/2015">

    Alternatively, you can access the generated controls manually:

    Analogously, for filtering you can also use ItemDataBound event handler:

    However, if you want to apply initial filtering to grid columns, you should use the FireCommandEvent method:

    I hope this will prove helpful.

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top