PDA

View Full Version : Date unrecognized from Data Builder UI genered by Json format



christophe.valmir.name
9 Aug 2018, 11:13 PM
Hello,
I have a problem when I generate model from json webservice. The field date are recognized like "string" and not "date" :/

For example:
[
{
"Id": 789425052305425613,
"Nom": "qVy ",
"Email": "mrTs INT BWfZQA ",
"Password": "ecl zdxVqc ArmujC ",
"Prenom": " ",
"Administrateur": true,
"Telephone": "+33 71845845",
"DateCreation": "2009-09-28T09:24:28.163977973+02:00",
"DateInactif": "2018-02-17T19:53:03.16397932+01:00",
"DateDestruction": "2017-06-25T04:44:29.163980373+02:00",
"TicketConnexionDate": "2010-05-27T12:25:26.163981471+02:00",
"TicketConnexionNumero": ""
}
]
For my memory, ISO 8601 can use this format ?

Forum_Adm
7 Sep 2018, 12:52 PM
Thanks for your question. I sent this to a team member and we will get this resolved for you!

pakumar
17 Sep 2018, 7:31 AM
Hi there,

You can define the field in the store as follows:
{
name: 'someDate',
type: 'date',
dateFormat: 'm-d-Y g : i A'
}


and then put the following renderer on your grid column:
renderer: Ext.util.Format.dateRenderer('m-d-Y g : i A')

Regards,
Pavan.
Sencha Support.