李浩荣的专栏

学习是件快乐的事情。每天下班路上想到比昨天进步了,那种幸福很美妙

截取字符串,获取时间,并提取星期

date1.text="09/07/2007";
                   date2.text="09/10/2007";
                   
                   
                   
                     var objYear2:Object =(Object)(this.date1.text.substring(6,10));
                     var month2:Number = (Number)(this.date1.text.substring(0,2))-1;
                     var day2:Number = (Number)(this.date1.text.substring(3,5));
                     dateA = new Date(objYear2,month2,day2);
                     var objYearB:Object =(Object)(this.date2.text.substring(6,10));
                     var monthB:Number = (Number)(this.date2.text.substring(0,2))-1;
                     var dayB:Number = (Number)(this.date2.text.substring(3,5));
                     dateB = new Date(objYearB,monthB,dayB);
                    
                     date1.selectedDate=dateA;
                     date2.selectedDate=dateB;
                     date1.addEventListener("change",aaa);
                     Alert.show("day========"+dateB.day.toString()); 
阅读更多
文章标签: date object
个人分类: Flex
上一篇Flex 时间控件的使用
下一篇DateField绑定日期控件
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭