Relatively new here. I have looked through examples and have only seen stuff with a date picker but I am not looking for that. I am currently setting up a form but can't seem to get this part of it.


I have declared variables for the date as well.

var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();

I would like for the date field to be automatically populated with the current date and be locked. Any idea's?

Code:
items: [
        {
        xtype: 'fieldset',
        title: 'Details',
        items: [{
            xtype: 'textfield',
            name : 'fname',
            label: 'First Name',
			required: true
            },{
            xtype: 'textfield',
            name : 'lname',
            label: 'Last Name',
			required: true
            },{
            xtype: 'textfield',
            name : 'pnumber',
            label: 'Phone Number',
			required: true
            },{
            xtype: 'textfield',
            name : 'date',
            label: 'Date',
            }
]
}]