PDA

View Full Version : Add DatePicker To fieldset Error



joefox
7 Jan 2010, 3:13 PM
Hey guys I'm new to extjs, and was having some problems adding a datefield picker to a fieldset, any ideas what im doing wrong? I dont want it in as a fieldset, i wanted it a form not a fieldset, so that when you clicke the item in the drop down accordion, it will show form items, in the lowe section, here is what i have...


region:'west',
id:'west-panel',
title:'Main Menu',
split:true,
width: 200,
minSize: 175,
maxSize: 400,
collapsible: true,
margins:'5 0 0 5',
layout:'accordion',
layoutConfig:{
animate:true
},
defaults:{
collapsed:true
},
items: [{
contentEl: 'user_managment_main',
title:'Snap Shot Reports',
border:false,
autoScroll:true, // Allow Scrolling
iconCls:'reporting',
tbar:
[{
xtype: "fieldset",
iconCls: "icon-user",
defaultType: "datefield",
labelAlign: "left",
items: [{
fieldLabel: 'Start Date',
name: 'startdt',
id: 'startdt',
width: 100,
vtype: 'daterange',
endDateField: 'enddt' // id of the end date field
},{
fieldLabel: 'End Date',
name: 'enddt',
id: 'enddt',
width: 100,
vtype: 'daterange',
startDateField: 'startdt' // id of the start date field
}]
}]

http://imagesticky.com/images/3cdg91frtm96aahr9te8.jpg

joefox
8 Jan 2010, 6:41 AM
anyone

Animal
8 Jan 2010, 7:53 AM
padding? labelWidth?

Just the normal stuff that is documented and obvious.

joefox
8 Jan 2010, 8:05 AM
padding? labelWidth?

Just the normal stuff that is documented and obvious.

but its a type fieldset, and i dont want that, i just want it to show without the fieldset wrapped around it.

Animal
8 Jan 2010, 8:26 AM
Huh?

Don't use a FieldSet then!

CrazyEnigma
8 Jan 2010, 8:30 AM
Animal pointed out the obvious. That's what I would have answered.

Don't want the fieldset, remove it, but set the labelWidth and padding.

joefox
8 Jan 2010, 8:30 AM
I did remove it, and nothing shows up then under that item.

Animal
8 Jan 2010, 10:26 AM
So, what did you put the DateFields in then?

"remove" it? You mean change it!

Wouldn't it be good if there was just a raw Container class which you could put items in which was just a pure DIV? eh?

joefox
8 Jan 2010, 10:28 AM
when it was a pure div, and i rendered it in there, it didnt fit to the screen..

Animal
8 Jan 2010, 10:29 AM
<shoots self>

joefox
8 Jan 2010, 11:16 AM
When I removed
xtype: "fieldset",

The date pickers dont show anymore...


items: [{
contentEl: 'user_managment_main',
title:'Snap Shot Reports',
border:false,
autoScroll:true, // Allow Scrolling
iconCls:'reporting',
tbar:
[{
iconCls: "icon-user",
defaultType: "datefield",
labelAlign: "left",
items: [{
fieldLabel: 'Start Date',
name: 'startdt',
id: 'startdt',
width: 100,
vtype: 'daterange',
endDateField: 'enddt' // id of the end date field
},{
fieldLabel: 'End Date',
name: 'enddt',
id: 'enddt',
width: 100,
vtype: 'daterange',
startDateField: 'startdt' // id of the start date field
}]
}]

Tried this, but it just comes up with 2 small text box's but i cant type or do anything in them..


items: [{
contentEl: 'user_managment_main',
title:'Snap Shot Reports',
border:false,
autoScroll:true, // Allow Scrolling
iconCls:'reporting',
items: [{
fieldLabel: 'Start Date',
name: 'startdt',
id: 'startdt',
width: 100,
vtype: 'daterange',
endDateField: 'enddt' // id of the end date field
},{
fieldLabel: 'End Date',
name: 'enddt',
id: 'enddt',
width: 100,
vtype: 'daterange',
startDateField: 'startdt' // id of the start date field
}]