title: How to use widgets in Django Crisp Forms
body: <p>I am using Django Crispy forms and its FormHelper. In my FormHelper class  i want that one of the field should use widgets. The reason for using widget is that i want to populate a date picker in one of the field.</p>
  
  <p>Using the Field, i am able to populate the DatePicker in my updated_date by identifying the css_class. But i want to give DatePicker a format and theme (attrs). How will i be able to do that?</p>
  
  <p>forms.py</p>
  
  <pre><code>class DeviceFilterFormHelper(FormHelper):
      # form_class = "form form-inline"
  
      form_id = "Device-search-form"
      form_method = "GET"
      form_tag = True
      html5_required = True
      layout = Layout(
          Div(
              Div('name', css_class="col-md-6"),
              Div('location', css_class="col-md-6"),
              css_class='row'
          ),
          Div(
              Div('phone_number', css_class="col-md-6"),
              Div(Field('updated_date', css_class="date-time-picker")),
              css_class='row'
              ),
          FormActions(
              Submit("submit", ("Search"), css_class="col-md-5"),
              css_class="col-8  text-right align-self-center",
          ),
      )
  </code></pre>
  
  <p>Below is the widget along with its attributes which i want to use in the FormHelper. </p>
  
  <pre><code>updated_date = forms.DateInput(attrs={
                                                 'required': True,
                                                 'class': 'date-time-picker',
                                                 'data-options': '{"format":"Y-m-d H:i", "timepicker":"true"}'
  
                                             }),
  </code></pre>
  
  <p>I just can't figure out how will i be using the widget.</p>