我有三个不同的日,月和年字段,每个字段分别为开始日期和结束日期。我没有使用Jquery Date picker,因为这些是单独的字段,因为只需要月份和年份。我想限制结束日期字段不在开始日期字段之后。请建议我怎么做。任何建议将不胜感激
这是我正在使用的代码。
提前致谢。
<div>
<label>
<span>Start Day</span>
<input id="InsuranceStartDay" class="autofill" type="number" data-name="insuranceStartDay"
name="InsuranceStartDay" max="31" min="1" size="2">
</label>
<label>
<span>Start Month</span>
<input id="InsuranceStartMonth" class="autofill" type="number" data-name="insuranceStartMonth"
name="InsuranceStartMonth" min="1" max="12" size="2" required>
</label>
<label>
<span>Start Year</span>
<input id="InsuranceStartYear" class="autofill" type="number" data-name="insuranceStartYear"
name="InsuranceStartYear" size="4" min="1900" max="3000" maxlength="4" required>
</label>
<label>
<span>End Day</span>
<input id="InsuranceEndDay" class="autofill" type="number" data-name="insuranceEndDay"
name="InsuranceEndDay" max="31" min="1" size="2">
</label>
<label>
<span>End Month</span>
<input id="InsuranceEndMonth" class="autofill" type="number" data-name="insuranceEndMonth"
name="InsuranceEndMonth" min="1" max="12" size="2" required>
</label>
<label>
<span>End Year</span>
<input id="InsuranceEndYear" class="autofill" type="number" data-name="insuranceEndYear" name="InsuranceEndYear" size="4" min="1900" max="3000" maxlength="4" required>
</label>
</div>