You can add a change handler to the DateField to modify the default 
bahavior that clears the date when the same value is selected again.

Regarding the second issue, I believe what you are seeing is the 
current date being highlighted; that can be changed with 
the "showToday" property.

  import mx.controls.DateField;
  var lastSelectedDate: Date;

  function onDateChanged(df: DateField) : Void {
    if (df.selectedDate == null) {
      if (lastSelectedDate != undefined) 
        doLater(this, "setSelectedDate", [df, lastSelectedDate]);
    }
    else {
      lastSelectedDate = df.selectedDate;
    }
  }

  function setSelectedDate(df: DateField, date: Date) : Void {
    df.selectedDate = date;
  }

...
<mx:DateField 
    showToday="false" 
    change="onDateChanged(event.target)"/>


--- In [email protected], "Yasovardhan Babu" 
<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> When a select the same date twice, the date selected is cleared in 
the 
> text box.How to retain the same date when clicked twice?
> 
> I also have one more issue with datefield control.
> 
> If I select a date, it is retaining selected day, month and 
year.When 
> I click on a button and came back to the DateField control to 
choose 
> the date, it should show the current date and not the previously 
> selected date. How to solve this? Please help.
> 
> Thanks and Regards,
> Yasu.
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to