Extjs Grid updating Issue in Date Field -
i have 3 datefield in grid , when updating in row, shows red mark on date field means date fields modified not making change in date field.
i tried find out problem , got following reason:
context.originalvalues.datecreated : 11/10/2014 context.originalvalues.datemodified : 11/10/2014 context.originalvalues.lastlogin : 11/10/2014
and
context.newvalues.datecreated : mon nov 10 2014 00:00:00 gmt+0530 (ist) context.newvalues.datemodified : mon nov 10 2014 00:00:00 gmt+0530 (ist) context.newvalues.lastlogin : mon nov 10 2014 00:00:00 gmt+0530 (ist)
so, grid shows these dates columns updated. there way solve issue.
thanks in advance.
solved issue :)
the date in store in string format created date object in store, , working fine. used following codes create date object in store.
{ name: 'lastlogin', type: 'date', dateformat: 'n/j/y', convert: function (newvalue, model) { return new date(model.get('lastlogin')); } }
Comments
Post a Comment