aboutsummaryrefslogtreecommitdiff
path: root/app/dispatch/static/base.js
blob: 5f57441b04b3a92c15cd1c5021f12551b02f657b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$( document ).ready(function(){
  all_date_fields = document.querySelectorAll("[name='date']");

  for ( i = 0 ; i < all_date_fields.length ; i++ ) {
    console.log(all_date_fields[0])
    $(all_date_fields[0]).pickadate({
      selectMonths: true, // Creates a dropdown to control month
      selectYears: 15, // Creates a dropdown of 15 years to control year,
      // format: 'dd/mm/yyyy',
      format: 'yyyy-mm-dd',
      today: 'Today',
      clear: 'Clear',
      close: 'Ok',
      closeOnSelect: false // Close upon selecting a date,
    });

  }


});