PDA

View Full Version : how to manipulate selected date in datefield



innovator
9 Nov 2009, 11:09 PM
Hi,
I am using datefield to chose a date. I am using by deafault format. That after selecting date comes in format of 02/02/2009. I want after each selection the date would become 02/02/2009 11:11:07. Time is fixed having the same value always
How i can achieve this.
following is my code , i have constructed a function to return the datefield type, by passing a object having all required values to construct.


function getStartDateField(comp){
return new Ext.form.DateField(
{
fieldLabel:comp.text,
width:comp.width,
id:comp.id,
vtype: comp.vtype,
endDateField:comp.endfield,
invalidText:comp.invalidtext,
listeners:{
blur: function(field){
Ext.getCmp(field.endDateField).setMinValue(field.getValue());
}

}
}
);
}