ruby on rails - ROR simple-form datepicker -
i have finished building first ror app, , in love way came out except these big ugly clunky date selectors on page. on in development installed simple_form gem handle forms. done, want make clunky date selectors textfields datepickers. have followed bunch of dead ends, installed simple-form-datepicker gem, , trying follow jquery-ui-dateselector guides, having luck.
my application.js file looks like
//= require jquery //= require jquery_ujs //= require jquery.ui.all //= require turbolinks //= require_tree . $("input.datepicker").each(function(input) { $(this).datepicker({ dateformat: "yy-mm-dd", altfield: $(this).next() })
i included *require jquery in css file well. form code looks
<%= f.input :assigned_date, :as :datepicker %>
am getting error says
/home/jps/gtf_app/app/views/investigations/_form.html.erb:50: syntax error, unexpected ':', expecting ')' ...( f.input :assigned_date, :as :datepicker );@output_buffer.s... ... ^
really last thing have before feel comfortable saying done working on application. beautiful , awesome except these ugly date selectors. earlier in app simple_form gave me headache radio buttons , again dropdown selectors. starting think simpleform maybe isnt simple. appreciated.
thanks
your syntax invalid, want:
<%= f.input :assigned_date, as: :datepicker %>
or
<%= f.input :assigned_date, :as => :datepicker %>
Comments
Post a Comment