I am using a datetime range picker as given here . In some scenarios, I need only start-time and end-time dropdowns. Is it possible to disable all dates shown in the calendar or hide the calendar? I also want to remove the label displayed before the "Cancel" and "Apply" buttons. Does anyone know how to do this?
I am using JQuery to hide the calendar but not sure whether this is the right way to do it.
# Hide Calendar
$(".calendar-table").hide();
# Hide label that is displayed before "Cancel" and "Apply" buttons.
$(".drp-selected").hide();
According to official doc
autoApply: (true/false) Hide the apply and cancel buttons, and automatically apply a new date range as soon as two dates are clicked.
show.daterangepicker: Triggered when the picker is shown
$('#daterangepicker').daterangepicker({
"autoApply": true,
}).on('show.daterangepicker', function (ev, picker) {
picker.container.find(".calendar-table").hide();
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.