var FromEndDate = new Date();
$('.conv_datetimepicker').datetimepicker({
format: 'MM/dd/yyyy hh:mm:ss',
endDate: FromEndDate,
autoclose: true
});
答案 0 :(得分:0)
如果您使用http://eonasdan.github.io/bootstrap-datetimepicker/中的Bootstrap DateTimePicker:
,请使用此选项function ValidateConvTime() {
var eventTime = $("#conv_datetimepicker").data('DateTimePicker').date();
var currentTime = new Date();
if (eventTime > currentTime) {
alert("error")
}
}