|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
- //值提示去掉虚线和参数名
- <script language="javascript">
- var form = getFormWarpRequest();
- var dropDown = form._oLstChoices_updownlist;//_updownlist为值提示组件名
- dropDown.remove(1);
- dropDown.remove(0);
- dropDown.removeAttribute("hasLabel");
- </script>
- //date prompt默认为当日
- //昨日
- <script>
- function subtractDay ()
- {
- var dtToday = new Date();
- var dtYesterday = new Date( dtToday - 86400000 );
- var strYesterday = [dtYesterday.getUTCFullYear(), dtYesterday.getMonth()+1, dtYesterday.getDate()].join("-");
- return strYesterday;
- }
- pickerControlPDate.setValue( subtractDay() );//PDate为date prompt组件名称
- </script>
- //本周第一天
- <script>
- function showWeekFirstDay()
- {
- var Nowdate=new Date();
- var WeekFirstDay=new Date(Nowdate-(Nowdate.getDay()-1)*86400000);
- var strWeekFirstDay = [WeekFirstDay.getUTCFullYear(), WeekFirstDay.getMonth()+1, WeekFirstDay.getDate()].join("-");
- return strWeekFirstDay;
- }
- pickerControlPDate.setValue( showWeekFirstDay() );
- </script>
- //本月第一天
- <script>
- function showMonthFirstDay()
- {
- var Nowdate=new Date();
- var MonthFirstDay=new Date(Nowdate-(Nowdate.getDay()-1)*86400000);
- var strMonthFirstDay = [MonthFirstDay.getUTCFullYear(), MonthFirstDay.getMonth()+1, MonthFirstDay.getDate()].join("-");
- return strMonthFirstDay;
- }
- pickerControlPDate.setValue( showMonthFirstDay() );
- </script>
- //本月最后一天
- <script>
- function ShowMonthLastDay()
- {
- var Nowdate=new Date();
- var MonthNextFirstDay=new Date(Nowdate.getYear(),Nowdate.getMonth()+1,1);
- var MonthLastDay=new Date(MonthNextFirstDay-86400000);
- var strMonthLastDay = [MonthLastDay.getUTCFullYear(), MonthLastDay.getMonth()+1, MonthLastDay.getDate()].join("-");
- return strMonthLastDay;
- }
- pickerControlPDate.setValue( ShowMonthLastDay() );
- </script>
|
-
-
|