开发者

Flex - how to detect event when a DateField is edited

开发者 https://www.devze.com 2023-03-10 12:08 出处:网络
How can I detect when a user changes a date field - specifically when they TYPE the date as I have set it to editable:

How can I detect when a user changes a date field - specifically when they TYPE the date as I have set it to editable:

<mx:FormItem label="Assigned" x="220" y="59">
        <mx:DateField formatString="YYYY-MM-DD" id="clinicianAssignedDateInput" editable="true" text="@{this._currentEditEncounter.clinicianAssignedDate}" toolTip="format: YYYY-MM-DD" change="clinic开发者_高级运维ianAssignedDateInput_dataChangeHandler(event)"/>
    </mx:FormItem>

The change event seems to only throw when using the calendar pop-up. It is not thrown when the user manually types in to the field.

I also tried dataChange.


I found something that works - I used the focusOut="" event.


I don't think that's possible unless you extend the component and change the functionality; just add an event listener (change event) to the textinput and dispatch another event within the component.

Personally if I were you, I'd try to use Spark alternatives. There's no official one, but I found this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号