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

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

2 Answers 40 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Ariel Erlijman
Top achievements
Rank 1
Ariel Erlijman asked on 13 Aug 2010, 08:27 PM
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 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 17 Aug 2010, 05:28 PM
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
0
Ariel Erlijman
Top achievements
Rank 1
answered on 17 Aug 2010, 05:48 PM
That worked fine.
Thx
Tags
DatePicker
Asked by
Ariel Erlijman
Top achievements
Rank 1
Answers by
Milan
Telerik team
Ariel Erlijman
Top achievements
Rank 1
Share this question
or