diff --git a/app/assets/javascripts/datetimepicker.js b/app/assets/javascripts/datetimepicker.js new file mode 100644 index 000000000..4ff5cc6a9 --- /dev/null +++ b/app/assets/javascripts/datetimepicker.js @@ -0,0 +1,12 @@ +// see https://getdatepicker.com +console.log('trying to import datetimepicker'); +$('#assignment-picker').tempusDominus({ + display: { + sideBySide: true + }, + localization: { + startOfTheWeek: 1, + format: 'yyyy-MM-dd HH:mm', + hourCycle: 'h23' + } +}); diff --git a/app/views/assignments/_form.html.erb b/app/views/assignments/_form.html.erb index 8377dc5f0..f8ded9f8f 100644 --- a/app/views/assignments/_form.html.erb +++ b/app/views/assignments/_form.html.erb @@ -1,3 +1,5 @@ +<%= javascript_include_tag 'datetimepicker' %> +