set "today" on DateChooser control
hi,
i wondering if there way set "today" date in datechooser component. looking @ source of datechooser , calendarlayout controls, "today" set current date in machine's timezone , not seem have control on setting today's date. need able set today date in timezone specified in user-profile, instance,.
thanks in advance
tejas
hi ,
you can set selected date in datechooser control using selecteddate property of datechooser control...
as said true "today" set current date in machine's timezone , have way control on setting today's date.
check out code below ...you can see in setselecteddate() function setting datechooser control date 2nd december 2009...
you can give values date want datechooser select...by using selecteddate property...
<?xml version="1.0"?>
<mx:application xmlns:mx="http://www.adobe.com/2006/mxml" creationcomplete="setselecteddate();">
<mx:script>
<![cdata[
private function setselecteddate():void {
datechooser.selecteddate = new date(2009,11,02);
}
]]>
</mx:script>
<mx:dateformatter id="df"/>
<mx:panel title="set selected date..." height="75%" width="75%"
paddingtop="10" paddingleft="10" paddingright="10">
<mx:vbox>
<mx:label text="simple datechooser control."/>
<mx:datechooser id="datechooser" yearnavigationenabled="true"/>
</mx:vbox>
</mx:panel>
</mx:application>
hope required..
if post answers question or helps, please kindly mark such.
thanks,
bhasker chari
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment