Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to customize... #52

Open
pch783 opened this issue Sep 18, 2020 · 1 comment
Open

how to customize... #52

pch783 opened this issue Sep 18, 2020 · 1 comment

Comments

@pch783
Copy link

pch783 commented Sep 18, 2020

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]
            }
        ),
    }
@kesslmar
Copy link

kesslmar commented Apr 2, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants