zoukankan      html  css  js  c++  java
  • js 设置默认时间

                                <td class="title95">计划生产日期</td>
                                <td>
                                    <input id="BeginSch" name="BenginProdceDate" class="easyui-datebox filewidth_n" type="datetime" data-options="required:false,validType:['DateDay'],onSelect:function(){fullnum('BeginSch','EndSch')}">
                                </td>
                                <td align="center">至</td>
                                <td>
                                    <input id="EndSch" name="EndProdceDate" class="easyui-datebox filewidth_n" style="150px" type="datetime" data-options="required:false,validType:['DateDay'],onSelect:function(){fullnum('BeginSch','EndSch')}">
                                </td> 
    
    
     SetSearchDay('BeginSch', 'EndSch', 1, 7)
    
    //初始化设置查询时间
    //beginID:开始的Id名称 
    //EndID:结束的Id名称 
    //Type:1:向前,2向后
    //SpanDays: 间隔天数
    function SetSearchDay(BeginID, EndID, Type, SpanDays) { 
        var fdate ;
        var tdate ;
        if (Type == 1) {
            fdate = (new Date().getFullYear()) + "-" + (new Date().getMonth() + 1) + "-" + (new Date().getDate() );
            tdate = (new Date().getFullYear()) + "-" + (new Date().getMonth() + 1) + "-" + (new Date().getDate() + SpanDays);
        } else if (Type == 2) {
            fdate = (new Date().getFullYear()) + "-" + (new Date().getMonth() + 1) + "-" + (new Date().getDate() - SpanDays);
            tdate = (new Date().getFullYear()) + "-" + (new Date().getMonth() + 1) + "-" + (new Date().getDate());
        }
    
        $("#" + BeginID).datebox('setValue', fdate);
        $("#" + EndID).datebox('setValue', tdate);
    }
    

      

  • 相关阅读:
    商用 三色灯 显示屏 原理概述
    高速LVDS时序到底怎么看
    quartus qsys sdram IP 使用
    Avalon 总线 时序 介绍
    以太网 mac层传输 verilog 测试程序
    quartus15.1 下程程序 电脑蓝屏 解决方法
    vivado 波形保存以及arp
    quartus timequest 使用过程中的笔记
    Modelsim 仿真指令force用法
    开发笔记(一)Kintex
  • 原文地址:https://www.cnblogs.com/lhlong/p/8026725.html
Copyright © 2011-2022 走看看