<![CDATA[ renderDate not working - My Forums]]> https://forums.modx.com/thread/?thread=78405 <![CDATA[Re: renderDate not working]]> https://forums.modx.com/thread/78405/renderdate-not-working#dis-post-432468 ]]> [email protected] Aug 07, 2012, 05:07 AM https://forums.modx.com/thread/78405/renderdate-not-working#dis-post-432468 <![CDATA[Re: renderDate not working]]> https://forums.modx.com/thread/78405/renderdate-not-working#dis-post-432378
with this fix it should now:
https://github.com/Bruno17/MIGX/commit/5d91ea7f9c27d4f5e448eb5342d6498f2edace11]]>
Bruno17 Aug 06, 2012, 12:24 PM https://forums.modx.com/thread/78405/renderdate-not-working#dis-post-432378
<![CDATA[renderDate not working]]> https://forums.modx.com/thread/78405/renderdate-not-working#dis-post-432188
I'm trying to use this.Renderdate with a MIGX tv. I've set manager_date_format to d-m-Y but this isn't having an effect. I have 2.2.3 installed and the code is there in grid.config.inc.php:

$renderer['this.renderDate'] = "
renderDate : function(val, md, rec, row, col, s) {
    var date;
    date = Date.parseDate(val, 'Y-m-d H:i: s');
    return String.format('{0}', date.format(MODx.config.manager_date_format+' '+MODx.config.manager_time_format));
}
";


My grid is defined as:

[
{"header": "Week", "width": "50", "sortable": "false", "dataIndex": "week"},
{"header": "Price", "width": "350", "sortable": "false", "dataIndex": "price"},
{"header": "Begins", "width": "150", "sortable": "false", "dataIndex": "begins", "renderer": "this.renderDate"},
{"header": "Ends", "width": "150", "sortable": "false", "dataIndex": "ends", "renderer": "this.renderDate"},
{"header": "Sold", "width": "50", "sortable": "false", "dataIndex": "sold"}
]


Any ideas on why it's not working?]]>
[email protected] Aug 03, 2012, 09:27 AM https://forums.modx.com/thread/78405/renderdate-not-working#dis-post-432188