加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Flex中通过DateField等接收年月日时分秒的输入

发布时间:2020-12-15 01:17:52 所属栏目:百科 来源:网络整理
导读:? 使用DateField接收年月日,NumericStepper接收时分秒,具体实现: ???? mx:Grid width="100%" ????? mx:GridRow ?????? mx:GridItem horizontalAlign="left" ??????? mx:DateField id="upTime" selectedDate="{new Date ()}" formatString="YYYY-MM-DD" en
?

使用DateField接收年月日,NumericStepper接收时分秒,具体实现:
???? <mx:Grid width="100%" >
????? <mx:GridRow>
?????? <mx:GridItem horizontalAlign="left">
??????? <mx:DateField id="upTime" selectedDate="{new Date()}" formatString="YYYY-MM-DD" enabled="true" showToday="true" textAlign="center" yearNavigationEnabled="true"/>
??????? <mx:NumericStepper id="upHour" maxChars="2" minimum="0" maximum="23" stepSize="1" textAlign="center" width="40"/>
??????? <mx:Label text="时" textAlign="center" width="15"/>
??????? <mx:NumericStepper id="upMinute" maxChars="2" minimum="0" maximum="59" stepSize="1" textAlign="center" width="40"/>
??????? <mx:Label text="分" textAlign="right" width="15"/>
??????? <mx:NumericStepper id="upSecond" maxChars="2" minimum="0" maximum="59" stepSize="1" textAlign="center" width="40"/>
??????? <mx:Label text="秒" textAlign="center" width="15"/>
?????? </mx:GridItem>
????? </mx:GridRow>
???? </mx:Grid>

通过selectedDate="{new Date()}",让DateField一开始按照格式formatString="YYYY-MM-DD"显示当前时间,而text="{newDate()}"虽然也能显示当前时间,但不能显示设定的格式……

?
?
?
http://cache.baidu.com/c?m=9f65cb4a8c8507ed4fece7631045952458438014668cc7150884c013c5234c413037bee43a634a579392613156e91a07b4ed3575300326b19cc39c0f80fbc4277bd6707e671cf71741954eb8ca36719a77ce0cfeae69f0cb8325e3adc5a3ae4324cc44040a9780fa4d7712dd1ffa0345e5&p=9078c64ad1800af308e297781e5f&user=baidu&fm=sc&query=flex+datefield%CA%B1%BC%E4%BC%E4%B8%F4&qid=920f1a6209e9c07c&p1=4

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读