0
我正在使用simple-dtpicker javascript處理「from」和「to」兩個字段。 我想驗證這些字段的變化的日期選擇,如「從」<日期<「到」。使用simple-dtpicker javascript將限制設置爲「from」和「to」日期
$('#txt-to-date').change(function() {
$('#txt-from-date').appendDtpicker({
maxDate: $('#txt-to-date').val() // when the end time changes, update the maxDate on the start field
});
});
$('#txt-from-date').change(function() {
$('#txt-to-date').appendDtpicker({
minDate: $('#txt-from-date').val() // when the start time changes, update the minDate on the end field
});
});
$('#txt-to-date').trigger('change');
$('#txt-from-date').trigger('change');
我試過這個,但它不工作。 幫我驗證。
你的解釋可以幫助我,但我沒有得到正確驗證按我的要求 –