I've this app in ruby on rails framework and have one of a form field of date_select. I wanted to add datepicker of jquery in this date_select field using this link but nothing seems to work for me.
I've jquery-ui version 4.2.1 but still I'm getting error of Couldn't find file 'jquery-ui/datepicker' with type 'application/javascript' in rails
Here's my app\assets\javascripts\application.js
-
// some written text-
//= require rails-ujs
//= require turbolinks
//= require_tree .
//= require jquery-ui/datepicker
Here's my app\assets\stylesheets\application.css
/*
*= require_tree .
*= require_self
*= require jquery-ui/datepicker
*/
Here's my form-field in one of the controller view-
<%= form.text_field(:dateneed, id: :order_dateneed, :class=>'form-control mb-1') %>
and finally here's my coffee script of one of the controller-
$(document).on 'turbolinks:load', ->
$('#order_dateneed').datepicker
dateFormat: 'yy-mm-dd'
I'm tired since morning of trying all things from degrading version of jquery-ui-rails from 5.0 to 4.2.1 but still there's no datepicker in my text_field of date. Can anyone please help?