View Full Version : How to use german dateformat in a form/store?

8 Jun 2012, 11:44 PM
HI, I use a form and try to store the values of a form into a store with a model using the blow code.

record = form.getRecord(),
values = form.getValues();

if the form contains a date field, it does not get stored, if it is a non US date format. I am using a German date format like 13.06.2012.

I debugged it down to the place where it uses the below red marked line, where it return null. (ext-all-dev.js line 28773)
How can I use a German date format in a form to get stored correctly in a store?


convert: function(v) {
var df = this.dateFormat,

if (!v) {
return null;
if (Ext.isDate(v)) {
return v;
if (df) {
if (df == 'timestamp') {
return new Date(v*1000);
if (df == 'time') {
return new Date(parseInt(v, 10));
return Ext.Date.parse(v, df);

parsed = Date.parse(v);
return parsed ? new Date(parsed) : null;
sortType: st.asDate,
type: 'date'

9 Jun 2012, 12:07 PM
Hi all,

I solved the problem. it actually was based on the fact, that the

call return all fields as text fields, and the subsequent routines tried to parse the date value based on the US date format.

updateUser: function(button) {
var win = button.up('window'),
form = win.down('form'),
record = form.getRecord(),
values = form.getValues(false,false,false,true);

adding the last true to the getValues call, will make, that date fields are returned as date, and therefore it gets handled correctly