ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Date time issue

Open sanjayjaras opened this issue 11 years ago • 4 comments

Hi Team, When I use cell type as date for editable grid cell, it formats properly with format provided in cell Filter. However after getting focus for edit, the format get change to mm/dd/yyyy. My column defination is as follows. Also there us no way I can add time part. name : property.displayName, field : property.name, type:'date', cellFilter: 'date:"yyyy-MM-dd HH:mm"'. Please help me with this. If possible please provide example for the same. screenshot from 2015-02-03 00 10 32 screenshot from 2015-02-03 00 11 00

sanjayjaras avatar Feb 02 '15 18:02 sanjayjaras

@sanjayjaras ,as per my knowledge chrome's input type date will pick up date format from the system that you are using ,and not from the cellfilter defined in the edit Template

anoopsinghbayes avatar Feb 03 '15 06:02 anoopsinghbayes

Hi @sanjayjaras , There are 2 troubles with what you are doing:

  1. Though you are writing type 'Date', the actual type of javascript variable is not date but string. Thus its coming as mm/dd/yyyy instead of actual value (eg 2/3/2015).
  2. Grid provides only date editor and not datetime editor. If you need to be able to edit time also please go for custom editor.

jpuri avatar Feb 03 '15 13:02 jpuri

No response > 2 weeks. Closing.

c0bra avatar Feb 19 '15 16:02 c0bra

Is this implemented in the new version?

ckreddy08 avatar Sep 29 '15 20:09 ckreddy08