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

DateTime format problem

1 Answer 687 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Attila
Top achievements
Rank 2
Attila asked on 03 Oct 2017, 01:11 PM

Hello

One of my columns bound to a DateTime field of my model (all culture settings and js files are included, I guess not this one is the problem).

.Columns(columns=>columns.Bound(c=>c.SomeDateField).Format("{0: yyyy.MM.dd. HH:mm}";)

Showing the date is perfect: looks like '2017.10.03. 15:05'. The problem is when I click the Edit button (I have a command column too with InLIne edit). It is automatically converted to:

Tue Oct 03 2017 15:05:58 GMT+0200 (Central European Summer Time)

Yes, with this long text. It's not really userfriendly either to edit this cell or create a new row with this kind of cell...

Is it possible to use here some kind of datetime picker? I have also a numerictextbox field, that's so nice: I can only enter numbers or use the step-up and step-down buttons. :)

Thank you

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 05 Oct 2017, 07:18 AM
Hello, Attila,

Thank you for the information.

In general, when editing a DateTime column the Grid will automatically set a DatePicker as an editor. If only the text is shown I can assume that the date is not declared as a DateTime field in the model.

Also, if the DateTimePicker has to be used, I can suggest checking the following forum thread on a similar subject:

http://www.telerik.com/forums/inline-editing-on-grid-datetime-column-where-is-datetimepicker-

If the issue still occurs, please send a fully runnable example and I will gladly assist.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Attila
Top achievements
Rank 2
Answers by
Stefan
Telerik team
Share this question
or