-
1 Aug 2008 1:32 AM #1
If I set DateField disabled ,I can't get value
If I set DateField disabled ,I can't get value
Hi friends:
I want to set the DateField to "disable:true"(Because I don't want the user select Datepicker,readOnly can't help). But I find that If I set the DateField to disabled,I can't get the DateField's value in the server side. I means that:
My js code:
In the server side (Java),I can't get the value "outtime"Code:new Ext.form.DateField({ fieldLabel: 'datetimetoday', name: 'outtime', disabled:true, altFormats: 'Y-m-d H:i:s', value:(new Date()), }),
In the server side,it print "null".Code:String outtime =request.getParameter("outtime"); System.out.println("get outtime data:"+outtime); //print: null
If I set the disabled to true,I can get the "outtime" value. Why ? How to get the disabled DateField's value? Thks!
-
1 Aug 2008 1:38 AM #2
Disabled fields are not submitted, that is standard HTML form behaviour.
Do you really want a readOnly field?Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
1 Aug 2008 2:21 AM #3
Yes,I don't want to user select a datepicker. I find that user remain could change the field's value although I set it to readOnly. Common textfield is hard to set a date format text into it. How to use a readonly datefield?


Reply With Quote