reinstates datepicker code to application.js