-
23 May 2007 11:30 AM #1
DateField minValue depending on other DateField
DateField minValue depending on other DateField
Hi!
I think I've seen this somewhere in this forum but I can't find it.
How do I set the minValue of a DateField to the same date as selected/typed in another DateField? It looks to me like I have to set this value at development time. Is it possible to set it at runtime or is there another work around?
Regards, Jon.
-
23 May 2007 11:35 AM #2
minValue is a config property and it becomes a public property of the object - you should be able to just set it at runtime.
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
23 May 2007 6:07 PM #3
Thanks - I'll give it a try.
-
17 Dec 2007 1:32 PM #4
Where you able to get this to work? I'm trying to do the same thing, but with no luck so far.
Code:{ columnWidth:.20, layout: 'form', border:false, items: [{ xtype:'datefield', fieldLabel: 'Start Date', id: 'Project_SDate', name: 'Project_SDate', anchor:'77%', allowBlank:false//, //maxValue:document.getElementById('Project_EDate').value }] },{ columnWidth:.20, layout: 'form', border:false, items: [{ xtype:'datefield', fieldLabel: 'End Date', id: 'Project_EDate', name: 'Project_EDate', anchor:'77%', allowBlank:false, minValue:document.getElementById('Project_SDate').value }
-
17 Dec 2007 1:37 PM #5
That won't work b/c the dom elements don't exist at the time the config is created. The container has to be rendered in order access the dom.
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide


Reply With Quote