title: Django python: Using DateInput --Required argument 'year' (pos 1) not found
body: <p>I'm trying to use DateInput, but I get the following error
  <code>Required argument 'year' (pos 1) not found</code> here <code>{{ form.incident_date_time_reported|add_class:"form-control"}}</code> (line 52)</p>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>from django import forms
  import datetime
  from functools import partial
  DateInput = partial(forms.DateInput, {'class': 'datepicker'})
  
  class IncidentForm(forms.Form):
  
      incident_date_time_reported = forms.DateField(initial=datetime.date, required=False, widget=forms.DateInput)
  
      def search(self):
  
          # cleaning the data
          incident_date_time_reported = self.cleaned_data.get('incident_date_time_reported')
  
          query = Incident.objects.all()
  
          if incident_date_time_reported is not None:
              query = query.filter(incident_date_time_reported=incident_date_time_reported)
  
  
          return(query)
  </code></pre>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>{% extends "base.html" %}
  {% load widget_tweaks %}
  
  {% block content %}
  &lt;div class="container-fluid"&gt;
  
      &lt;!-----INPUT FORM-------------------&gt;
      &lt;form action="{% url 'incidents:index' %}" method="GET"&gt;
  
          &lt;div class="row"&gt;                       
              &lt;div class="form-group col-md-3"&gt;
                  &lt;label&gt;Date Incident Reported&lt;/label&gt;&lt;br&gt;
                  {{ form.incident_date_time_reported|add_class:"form-control"}}
                  {{ form.incident_date_time_reported.errors }}
              &lt;/div&gt;
              &lt;div class="form-group col-md-3"&gt;
                  &lt;label&gt;------&lt;/label&gt;
                  &lt;button type="submit" class="btn btn-primary btn-block"&gt;Search&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;&lt;!-----END OF BOOTSTAP CONTAINER FLUID-----&gt;
  {% endblock %}
  </code></pre>