refresh the calender in datefield component flex

69 views
Skip to first unread message

srinil

unread,
Apr 9, 2008, 5:57:22 AM4/9/08
to Flex India Community
Hi,

How to refresh the calender in <mx:DateField component, when
user select previous date using <mx:DateField next time when i click
the <mx:DateField component how to get the current date, because it
always showing the previously selected calender year date, it is not
refreshing to the current date. how to get the current daet to be
refreshed.



regards
srinil

Sujit Reddy

unread,
Apr 9, 2008, 10:12:26 AM4/9/08
to flex_...@googlegroups.com
Hi,

You can set the selected date in the DateField by setting the selectedDate property like df.selectedDate = new Date()
If you always want to set the current date to be selected when the user clicks on the DateField use the code below.
<mx:DateField id="df" open="df.selectedDate = new Date()"/>

is this what u r looking for ??
--
Regards,
Sujit Reddy. G

srinil

unread,
Apr 11, 2008, 6:51:45 AM4/11/08
to Flex India Community

Hi,

ok now i am getting the current date set inside the date field
component that is not needed. only the calender should refresh to the
current month and i need the date field box to be blank and calender
to be refreshed to the current date or month ,


regards
srinil

ANIL THOMAS

unread,
Oct 11, 2012, 8:36:34 AM10/11/12
to flex_...@googlegroups.com, srinil...@gmail.com


var now:date=new date();

 txtinsdatevalidtill.selectedDate=now;
                txtinsdatevalidtill.selectedDate=null;
                txtinsdatevalidtill.displayedYear=now.getFullYear();
                txtinsdatevalidtill.displayedMonth = now.getMonth();
Reply all
Reply to author
Forward
0 new messages