Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

date renderer issue in extjs

Tags:

extjs

I have a date renderer issue for a column. When browser language is in English the date is displayed in this format

09/14/2009 09:23 AM

But when I change the browser language to German(displays correctly in English and French) the date is not rendered it displays NAN/NAN/NAN 12:NAN PM

Here is the code.

var dateRenderer = Ext.util.Format.dateRenderer('m/d/Y h:i A');

var colModel = new Ext.grid.ColumnModel([
{ 
     header: xppo.st('SDE_DATE_OCCURRED'), 
     width: 75, 
     sortable: true, 
     dataIndex: 'DateOccurred', 
     renderer: dateRenderer 
}]);

How can I render the date in other languages? Please help me with this issue.

like image 545
xrx215 Avatar asked Apr 18 '26 05:04

xrx215


1 Answers

Are you certain that the input date is being parsed correctly for German? The dateRenderer output should be the same -- if it works at all, the language should not matter. Since you are getting NaN it's more likely that something in the input data for German is invalid.

like image 106
Brian Moeskau Avatar answered Apr 20 '26 03:04

Brian Moeskau



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!