RadDatePicker without time

4 posts, 0 answers
  1. Rafael
    Rafael avatar
    3 posts
    Member since:
    Oct 2010

    Posted 29 Aug 2012 Link to this post

    When I use RadDatePicker and update the item, the label show the result 29/08/2012 00:00:00.

                            <telerik:RadDatePicker ID="RadDatePicker1" runat="server" DbSelectedDate='<%# Bind("rEstimatedDelivery") %>' >
                                <DateInput runat="server" DateFormat="dd/MM/yyyy" DisplayDateFormat="dd/MM/yyyy" />
                                <Calendar runat="server" ViewSelectorText="dd/MM/yyyy" TitleFormat="dd/MM/yyyy" />
                            </telerik:RadDatePicker>

    How can I update only 29/08/2012, without 00:00:00 ?

    Thank you!

  2. Eyup
    Admin
    Eyup avatar
    1617 posts
    Member since:
    Sep 2012

    Posted 03 Sep 2012 Link to this post

    Hello Rafael,

    Could you please elaborate some more on your specific scenario? Exactly what do you mean by "update the item"?

    I have created a sample RadGrid web site to test the described appearance. On my side everything works as expected. Could you please check out the attached application and try to distinguish the crucial differences between our projects?

    All the best,
    Eyup
    the Telerik team

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.

  3. Rafael
    Rafael avatar
    3 posts
    Member since:
    Oct 2010

    Posted 03 Sep 2012 Link to this post

    Eyup,

    I want to save only the date on database, but the RadDatePicker saved date and time. The RadDateTimePicker need to save date and time, RadDatePicker need to save only date, right? But RadDatePicker is working same RadDateTimePicker. What I need to do to solve the problem?

    Result when save RadDatePicker:
    03/09/2012 00:00:00

    But I want to save:
    03/09/2012

  4. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 Sep 2012 Link to this post

    Hi,

    Try saving the date as shown below.
    C#:

    string s=RadDateTimePicker1.SelectedDate.Value.ToShortDateString();

    Thanks,
    Shinu.

Back to Top