后面的时间不能大于前面的时间
$("#startDate").datetimepicker({
format: "yyyy-mm-dd hh:ii",
autoclose: true,
todayBtn: true,
pickerPosition: (App.isRTL() ? "bottom-right" : "bottom-left"),
minuteStep: 10
}).on('change',function(ev){
var startDate = $('#startDate').val();
$("#returnDate").datetimepicker('setStartDate',startDate);
$("#startDate").datetimepicker('hide');
});
$("#returnDate").datetimepicker({
format: "yyyy-mm-dd hh:ii",
autoclose: true,
todayBtn: true,
pickerPosition: (App.isRTL() ? "bottom-right" : "bottom-left"),
minuteStep: 10
}).on('change',function(ev){
var returnDate = $("#returnDate").val();
$("#startDate").datetimepicker('setReturnDate',returnDate);
$("#returnDate").datetimepicker('hide');
});
主要关注点在于绑定的change方法里面的代码