jinionnet
12 Apr 2012, 4:33 AM
Hi Guys,
I have a grid panel with a date column. I am facing issue when I specify the date format. I want to display the date format as 'd-M-Y' and when I specify this format in the grid column, getting a blank field only. I have used ajax proxy and json reader.
Here is the json output for the grid store data. I have removed some fields, specified column is enrolled_date and it is a MySQL timestamp value.
{"success":true,"total":"1","mothers":[{"id":"1","mother_id":"12344","first_name":"Rose","last_name":"M","gender":"M","enrolled_date":"2012-04-09 19:27:16","opt_out_date":"2012-04-12"}]}
Also here is the MODEL configuration for that specific column
.............
..............
{
dateFormat: 'Y-m-d',
mapping: 'enrolled_date',
name: 'enrolled_date',
type: 'date'
},
{
dateFormat: 'Y-m-d',
mapping: 'opt_out_date',
name: 'opt_out_date',
type: 'date'
}
............
............
And GRID column configuration.
............
............
{
xtype: 'datecolumn',
dataIndex: 'enrolled_date',
text: 'Enrolled Date',
format: 'd-M-Y'
},
{
xtype: 'datecolumn',
dataIndex: 'opt_out_date',
text: 'Opt Out Date',
format: 'd-M-Y'
}
............
............
And I am attaching the result screen herewith.
33908
You can see that the "Enrolled Date" not displayed but same time "Opt Out Date" displayed perfectly.
Please help me to resolve this issue.
Thanks,
jini
I have a grid panel with a date column. I am facing issue when I specify the date format. I want to display the date format as 'd-M-Y' and when I specify this format in the grid column, getting a blank field only. I have used ajax proxy and json reader.
Here is the json output for the grid store data. I have removed some fields, specified column is enrolled_date and it is a MySQL timestamp value.
{"success":true,"total":"1","mothers":[{"id":"1","mother_id":"12344","first_name":"Rose","last_name":"M","gender":"M","enrolled_date":"2012-04-09 19:27:16","opt_out_date":"2012-04-12"}]}
Also here is the MODEL configuration for that specific column
.............
..............
{
dateFormat: 'Y-m-d',
mapping: 'enrolled_date',
name: 'enrolled_date',
type: 'date'
},
{
dateFormat: 'Y-m-d',
mapping: 'opt_out_date',
name: 'opt_out_date',
type: 'date'
}
............
............
And GRID column configuration.
............
............
{
xtype: 'datecolumn',
dataIndex: 'enrolled_date',
text: 'Enrolled Date',
format: 'd-M-Y'
},
{
xtype: 'datecolumn',
dataIndex: 'opt_out_date',
text: 'Opt Out Date',
format: 'd-M-Y'
}
............
............
And I am attaching the result screen herewith.
33908
You can see that the "Enrolled Date" not displayed but same time "Opt Out Date" displayed perfectly.
Please help me to resolve this issue.
Thanks,
jini