How to remove the 12:00:00 inside a DataTemplate?

3 posts, 0 answers
  1. Ariel Erlijman
    Ariel Erlijman avatar
    5 posts
    Member since:
    Jun 2010

    Posted 13 Aug 2010 Link to this post

    Using the datePicker inside a Grid in this way

                                                <telerik:GridViewDataColumn
                                                            Header="Termination"
                                                            DataMemberBinding="{Binding TerminationDate}"
                                                            >
                                                    <telerik:GridViewDataColumn.CellEditTemplate>
                                                        <DataTemplate>
                                                        <telerik:RadDatePicker SelectedDate="{Binding Path=TerminationDate, Mode=TwoWay}"/>                                                    
                                                        </DataTemplate>
                                                    </telerik:GridViewDataColumn.CellEditTemplate>
                                                </telerik:GridViewDataColumn>

    I get a 12:00:00 after I select a date and lost focus.

    If I use the same control outside, It works ok.
    I need to use the radpicker because the user shouldbe able to leave this date empty and with the dateDataColumn that was not possible
    Ideas? Is this a bug?
    Thx.
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 17 Aug 2010 Link to this post

    Hello Ariel Erlijman,

    You can place a simple DataFormatString (DataFormatString="d") on the GridViewDataColumn to resolve the issue. 


    Sincerely yours,
    Milan
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ariel Erlijman
    Ariel Erlijman avatar
    5 posts
    Member since:
    Jun 2010

    Posted 17 Aug 2010 Link to this post

    That worked fine.
    Thx
Back to Top