2018-02-04 19:28:09 +00:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from django.forms.widgets import DateInput
|
|
|
|
from django import forms
|
|
|
|
import datetime
|
|
|
|
|
|
|
|
|
|
|
|
class SearchForm(forms.Form):
|
|
|
|
source = forms.CharField(max_length=128)
|
|
|
|
date = forms.DateField(
|
2019-07-24 17:07:41 +00:00
|
|
|
label=_("date"),
|
2018-02-04 19:28:09 +00:00
|
|
|
initial=datetime.date.today(),
|
2019-07-24 17:07:41 +00:00
|
|
|
widget=DateInput(format="%Y-%m-%d"),
|
|
|
|
input_formats=["%Y-%m-%d"],
|
2018-02-04 19:28:09 +00:00
|
|
|
)
|