django-bootstrap-datepicker-plus icon indicating copy to clipboard operation
django-bootstrap-datepicker-plus copied to clipboard

how to customize...

Open pch783 opened this issue 4 years ago • 2 comments

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]
            }
        ),
    }

pch783 avatar Sep 18 '20 21:09 pch783

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!

kesslmar avatar Apr 02 '23 22:04 kesslmar