Flex - 以编程方式清除日期字段
在用户选择日期后或通过代码设置 myDateField.selectedDate
后,我找不到任何方法以编程方式清除 DateField
控件。
文档仅说明如果用户再次选择日期如何清除它。
但是执行 myDateField.selectedDate = myDateField.selectedDate
不起作用
我已经尝试了所有明显的,myDateField.selectedDate = null
,myDateField.text = ""< /code> - 但似乎没有任何效果。
有人有什么想法吗?
I cannot find any way to clear a DateField
control programmatically after either a user has selected a date, or after I set myDateField.selectedDate
via code.
Documentation only states how to clear it if a user selects the date again.
But doing myDateField.selectedDate = myDateField.selectedDate
doesn't work
I have tried all the obvious, myDateField.selectedDate = null
, myDateField.text = ""
- but nothing seems to be doing the trick.
Does anyone have any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我做了一个最小的测试示例:
它似乎工作正常。 您确定您的代码中没有一些令人困惑的错误吗?
(顺便说一句,这是 FB 3.2 的情况,以防版本问题。)
I made a minimal test example:
and it seems to work fine. Are you sure there isn't some baffling bug in your code?
(This is with FB 3.2 here, by the way, in case it is a version issue.)
它也适用于 FB2。
It works on FB2 too.