How to apply masking on datefield
in flex?
like when i enter text in datefield
it should be converted like MM/DD/YYYY
Asked
Active
Viewed 659 times
1

ketan
- 19,129
- 42
- 60
- 98

Tahir Alvi
- 896
- 2
- 14
- 44
-
Manually parse the input. Not a date - throw a warning on screen. – Vesper Nov 02 '12 at 07:55
-
@Vesper I wana know the event that is executed when user enter input text. – Tahir Alvi Nov 02 '12 at 07:57
1 Answers
0
Set the formatString
property of the DateField
in the change
event
<mx:Script>
<![CDATA[
import mx.events.*;
private function dateChanged(event:Event):void
{
dateField1.formatString = "MM/DD/YYYY";
}
]]>
</mx:Script>
<mx:DateField id="dateField1" change="dateChanged(event)" />

sohel khalifa
- 5,602
- 3
- 34
- 46
-
But the change method not dispatch when user input manually besides select date. – Tahir Alvi Nov 02 '12 at 10:50
-