Datetimepicker: permite elegir fechas de desactivación
Sé que suena loco pero necesito permitir elegir las fechas de desactivación aquí:https://eonasdan.github.io/bootstrap-datetimepicker/
¿Por qué? Necesito colorear las fechas con menos posibilidades de reservar, y colorear las fechas verdes donde la posibilidad de reservar es mayor, así que escribo:
<script>
$(function () {
$('#start').datetimepicker({
format: 'YYYY/MM/DD',
enabledDates: [
moment("05/21/2016"),
moment("05/22/2016"),
moment("05/23/2016"),
moment("05/24/2016"),
],
});
});
</script>
<style type="text/css">
.bootstrap-datetimepicker-widget table th.disabled,
.bootstrap-datetimepicker-widget table th.disabled:hover {
background: #FF9088 !!important;
border-radius: 0px !important;
color: #fff !important;
border: 1px solid #fff !important;
}
.bootstrap-datetimepicker-widget table td.disabled,
.bootstrap-datetimepicker-widget table td.disabled:hover {
background: #FF9088 !important;
border-radius: 0px !important;
border: 1px solid #fff !important;
color: #fff !important;
}
.bootstrap-datetimepicker-widget table td span.disabled,
.bootstrap-datetimepicker-widget table td span.disabled:hover {
background: #FF9088 !important;
border-radius: 0px !important;
border: 1px solid #fff !important;
color: #fff !important;
}
.day {
background: rgba(88, 204, 0, 0.52) !important;
border-radius: 0px !important;
border: 1px solid #fff !important;
}
</style>
Como puede ver, he habilitado las fechas en color verde y otras fechas están deshabilitadas y está en color rojo ... pero necesito permitir que los visitantes elijan también deshabilitar fechas, no solo habilitar ...
Utilizo habilitar y deshabilitar solo para colorear las fechas en el calendario ...
Entonces, ¿cómo permitir elegir las fechas de desactivación también?