title: How to use Datepicker in django
body: <p>I want to implement a django form with datepicker. I made my <strong>forms.py</strong></p>
  
  <pre><code>from django import forms
  
  class DateRangeForm(forms.Form):
      start_date = forms.DateField(widget=forms.TextInput(attrs=
                                  {
                                      'class':'datepicker'
                                  }))
      end_date = forms.DateField(widget=forms.TextInput(attrs=
                                  {
                                      'class':'datepicker'
                                  })) 
  </code></pre>
  
  <p>and
  <strong>views.py</strong></p>
  
  <pre><code>if request.method == "POST":
          f = DateRangeForm(request.POST)
          if f.is_valid():
              c = f.save(commit = False)
              c.end_date = timezone.now()
              c.save()
      else:
          f = DateRangeForm()
          args = {}
          args.update(csrf(request))
          args['form'] = f
  
  
      return render(request, 'trial_balance.html', {
          'form': f
      })
  </code></pre>
  
  <p><strong>balance.html</strong></p>
  
  <pre><code>&lt;div&gt;
      &lt;form action="" method="POST"&gt; {% csrf_token %}
      Start Date:{{ form.start_date }}&amp;nbsp;&amp;nbsp; End Date:{{ form.end_date }}&lt;br/&gt;
      &lt;input  type = "submit" name = "submit" value = "See Results"&gt;
      &lt;/form&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>And still there is no datepicker in my input box of that form.
  I also tried with including my files link in the script as in my balance.html</p>
  
  <pre><code>&lt;script src="{{ STATIC_URL }}js/jquery-1.3.2.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>still the datepicker is not working. But when including jquery in my html file, it also makes not to work jquery-treetable which I have implemented in my html file.</p>
  
  <p>How to make the datepicker work ?</p>