django-bootstrap-datepicker-plus
django-bootstrap-datepicker-plus copied to clipboard
how to customize...
hello I would like to know how to disable holidays (like Christmas or New Years). And restrict the minutes to 00 and 30. Example: 12.00 12.30
Thank u!
class Form(forms.ModelForm):
class Meta:
model = Reserva
fields = ["end_date", "start_time", "comensales"]
widgets = {
'comensales' : forms.NumberInput(
attrs={
'class': 'form-control',
}
),
'end_date': DatePickerInput(
format='%d/%m/%Y',
options={
"locale": "es",
}
)
'start_time': TimePickerInput(
options={
'enabledHours': [12, 13, 14, 19, 20 , 21, 22]
}
),
}
I would be interested in the restriction of the minutes as well. And is there any way to hide the disabled hours?
Edit: Where would one find the complete list of options? The documentation is referencing to a code snipped but it seems to be incomplete, as for instance 'enabledHours' is not mentioned there.
Thank you!