CRM 日期類型的一些處理JS

來源:互聯網
上載者:User

標籤:date()   計劃   class   日期   開始   處理   color   nbsp   get   

//當前日期var now = new Date();//換算為毫秒數var now_ms =  Date.UTC( now.getFullYear(), now.getMonth(),now.getDate());
//getMonth 從0-11 所以真實月份要+1, getDate 注意與 getDay的區別,getDate為日, getDay 為周//計算開始日期var _form_date =crmForm.all.new_begindate.DataValue ;//計劃開始日期加8 小時var form_date = new Date(_form_date.setHours(_form_date.getHours()+8)); var form_ms =Date.UTC(form_date.getFullYear(), form_date.getMonth(),form_date.getDate()); if(form_ms < now_ms){ //如果計劃開始日期小於當前日期禁止儲存 crmForm.all.new_begindate.DataValue = new Date(); crmForm.all.new_enddate.DataValue = new Date(); alert("計劃開始日期不能小於當前日期!");}

 

CRM 日期類型的一些處理JS

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.