I have this example
$('#datepicker').daterangepicker({
timePicker: true,
startDate: new Date(),
endDate: new Date(),
locale: {
format: 'MM/DD/YYYY HH:mm'
}
}, function(start, end, label) {
$("#range1").val(start.format('MM/DD/YYYY HH:mm:00')+" - "+end.format('MM/DD/YYYY HH:mm:00'));
});
Since I can dynamically change the daterangepicker to a dynamic datepicker, I mean that when you click on a button, you disable the second calendar and it works like a classic datepicker.