我的表单中有bootstrap datetimepicker的From和迄今。像这样 Date picker in my Form
我需要在选择from(日期)后在To(Date)中只显示一天 任何人都可以帮我显示它
这是我之前的代码
$(document).ready(function() {
$('#datetimepicker1').datetimepicker({
// stepping: 30,
//daysOfWeekDisabled: [0, 5],
// minDate: moment(new Date(), "YYYY-MM-DD HH:mm").add(3, 'days'),
minDate: moment(new Date(), "YYYY-MM-DD"),
//enabledHours: [9, 10, 11, 12, 13, 14, 15, 16, 17],
format: 'YYYY-MM-DD HH:mm',
useCurrent: false
// autoclose: true
});
$('#datetimepicker2').datetimepicker({
//stepping: 30,
//minDate: moment(new Date(), "YYYY-MM-DD HH:mm").add(3, 'days'),
minDate: moment(new Date(), "YYYY-MM-DD"),
//enabledHours: [`enter code here`9, 10, 11, 12, 13, 14, 15, 16, 17],
format: 'YYYY-MM-DD HH:mm',
useCurrent: false,
keepOpen: false
});