I have test simple date formatter as follow code.
private function dtpMulai_chage(param0:Event):void
{
ymd1=ymdFormatter.format(dtpMulai.selectedDate);
Snackbar.show('ymd1='+ymd1).emphasis =
StyledUIBase.SECONDARY;
}
private function dtpSelesai_change(param0:Event):void
{
*ymd2=simpleFormatter.format(dtpSelesai.selectedDate);*
Snackbar.show('ymd2='+ymd2).emphasis =
StyledUIBase.SECONDARY;
}
<fx:Declarations>
<js:DateFormatYYYYMMDD id="ymdFormatter"/>
<js:SimpleDateFormatter id="simpleFormatter"
dateFormat="YYYYMMDD"/>
</fx:Declarations>
<c:beads>
<js:ContainerDataBinding/>
</c:beads>
<j:DateField localId="dtpMulai" dateFormat="DD/MM/YYYY"
selectedDate="{new
Date()}" change="dtpMulai_chage(event)">
<j:beads>
<j:DateFieldTextPrompt prompt="DD/MM/YYYY"/>
</j:beads>
</j:DateField>
<j:CheckBox text="To" selected="true" localId="chkSampai"/>
<j:DateField localId="dtpSelesai" dateFormat="DD/MM/YYYY"
selectedDate="{new Date()}" change="dtpSelesai_change(event)">
<j:beads>
<j:DateFieldTextPrompt prompt="DD/MM/YYYY"/>
</j:beads>
</j:DateField>
No problem with js:DateFormatYYYYMMDD.
But why my ymd2 variable always result with empty string?
Thankyou in advance.
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/