DateTime format problem

2 posts, 0 answers
  1. Attila
    Attila avatar
    22 posts
    Member since:
    Oct 2016

    Posted 03 Oct 2017 Link to this post


    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

  2. Stefan
    Stefan avatar
    2479 posts

    Posted 05 Oct 2017 Link to this post

    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:

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

    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.
Back to Top