class ProjectForm(forms.ModelForm):
start_date = forms.DateField(
widget=SelectDateWidget(
empty_label=("Choose Year", "Choose Month", "Choose Day")
))
end_date = forms.DateField(localize=True,
widget=forms.DateInput(attrs={"type": "date"}),
)
class ProjectForm(forms.ModelForm):
start_date = forms.DateField(
widget=SelectDateWidget(
empty_label=("Choose Year", "Choose Month", "Choose Day"),
attrs={'class': 'date-select'},
)
)
end_date = forms.DateField(
widget=forms.DateInput(
attrs={"type": "date", 'class': 'date-input'},
)
)
class Meta:
model = YourModel
fields = ['start_date', 'end_date']