PDA

View Full Version : Globally changing the date format?



mdornseif
7 Nov 2010, 1:30 AM
I want to use ISO 8601 / RfC 3339 through my whole application. For display purposes and for backend communication. Is there a way, I can specify that at a single place?

I'm aware that I could create something like the locale files (e.g. http://extjs.cachefly.net/ext-3.3.0/src/locale/ext-lang-de.js#) and overwrite/apply/extend every single date-related class. But how about Store Objekts? And is there anywhere a default date formatting and parsing function?

Regards

--md

Animal
7 Nov 2010, 2:04 AM
For Stores?

You mean Fields? It is Fields which are the level at which data is converted.

Ext.data.Field.prototype.dateFormat = 'blah';

For other widgets:

Ext.DatePicker.prototype.format = 'blah';
Ext.form.DateField.prototype.format = 'blah';

This is just what the locale files do.