Actually i want that format YYYYMMDD instead of YYYY-MM-DD And its working in flex, but not in royale.
On Mon, Nov 16, 2020 at 5:39 PM Carlos Rovira <[email protected]> wrote: > Hi Choirul, > > just checked your example and your problem is that format is incorrect. > You need this one: dateFormat="YYYY-MM-DD" > > El dom., 15 nov. 2020 a las 5:33, choirul anam (<[email protected]>) > escribió: > >> 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/ >> > > > -- > Carlos Rovira > Apache Member & Apache Royale PMC > *Apache Software Foundation* > http://about.me/carlosrovira > >
