diff options
| author | Mitch Riedstra <Mitch@riedstra.us> | 2017-10-09 22:32:36 -0400 |
|---|---|---|
| committer | Mitch Riedstra <Mitch@riedstra.us> | 2017-10-09 22:32:36 -0400 |
| commit | af6167f9d47182cc332ba4f4bdc65cc7ed890726 (patch) | |
| tree | 0291084425fdc12daa8302998365f2ee6d5e5d27 /app/dispatch/static/base.js | |
| parent | 5f137f66f19e60fb6f4b44a2d85076223e5837c5 (diff) | |
| download | dispatch-tracker-af6167f9d47182cc332ba4f4bdc65cc7ed890726.tar.gz dispatch-tracker-af6167f9d47182cc332ba4f4bdc65cc7ed890726.tar.xz | |
Start the ugly process of cleaning up the views. Added a datepicker to the load date form. Added the 'load_number' field to the LoadCreate view
Diffstat (limited to 'app/dispatch/static/base.js')
| -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, + }); + + } + + +}); |
