You must set the initial value using the property valuefor Ext.form.field.DateView:
{
...,
minValue: new Date(2000, 0, 1),
maxValue: new Date(2004, 11, 31),
value: new Date(2002, 5, 15),
...
}
EDIT after receiving more information from OP:
You can override the method onExpandthat initializes the value on the collector. The original one looks like this: (given that you are using ExtJS 4 - but 3 should not differ much):
...,
onExpand: function() {
var value = this.getValue();
this.picker.setValue(Ext.isDate(value) ? value : new Date());
},
...
You can override the method to read:
...,
onExpand: function() {
var value = this.getValue(),
myDefaultDate = ;
this.picker.setValue(Ext.isDate(value) ? value : myDefaultDate);
},
...
Just add an override to the field configuration of the initial form.
source
share