WdatePicker time limit the use of plug-ins before and after the range of two times the page

Most of the time, the start time & end time is the start time must not be greater than the end time, the end time can not be earlier than the start time of it, select the time with WdatePicker plug-in, then you can do a very good control time period.

Two time input box on the page:

    开始时间:  
    <input type="text" name="startDate" id="startDate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" />  
    结束时间:  
    <input type="text" name="endDate" id="endDate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" />  

Limitation start time end time range as follows:

    开始时间:  
    <input type="text" name="startDate" id="startDate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endDate\')}'})" />  
    结束时间:  
    <input type="text" name="endDate" id="endDate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'startDate\')}'})" />  

 

Guess you like

Origin www.cnblogs.com/sherryweb/p/11840837.html