wdatepicker默认时间为当前时间


$(document).ready(function() {

         alert(today());
 
          $("#orderDate").val(today());
         document.getElementById( "orderDate" ).value = today();
     });
 
 
function today(){
     var  today= new  Date();
     var  h=today.getFullYear();
     var  m=today.getMonth()+1;
     var  d=today.getDate();
     var  hh=today.getHours();
     var  mm=today.getMinutes();
     var  ss=today.getSeconds();
     m= m<10? "0" +m:m;     
     d= d<10? "0" +d:d;
     hh = hh < 10 ?  "0"  + hh:hh;
     mm = mm < 10 ?  "0"  +  mm:mm;
     ss = ss < 10 ?  "0"  + ss:ss;
     return  h+ "-" +m+ "-" +d+ " " +hh+ ":" +mm+ ":" +ss;
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM