diff options
Diffstat (limited to 'app/dispatch/static')
| -rw-r--r-- | app/dispatch/static/base.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/dispatch/static/base.js b/app/dispatch/static/base.js new file mode 100644 index 0000000..5f57441 --- /dev/null +++ b/app/dispatch/static/base.js @@ -0,0 +1,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, + }); + + } + + +}); |
