date and time only especific days and hours

16 views
Skip to first unread message

Debora Peralta

unread,
Jan 3, 2020, 9:03:17 AM1/3/20
to Django users
How do I make a limit of available pick dates only on weekdays and times slots between 9am to 5pm? I'm using this widget for date ant time picker as it was the only one working with my django version (1.11.10) please help!!! from django import forms
class DateInput(forms.DateInput):
input_type = 'date'
class RequestForm(forms.Form):
"""Form to allow users to request an hour of profesional service support"""
name = forms.CharField(required=True, max_length=75)
email = forms.EmailField(required=True, max_length=75)
subject = forms.CharField(required=True, max_length=75)
date_required = forms.DateField(widget=DateInput)
Reply all
Reply to author
Forward
0 new messages