Datepicker is working for selecting date but it is not saving it to my database. Trying several options as show in code below but it still is not working. This code give me an error. How do I properly format the f.text_field?
<div class="form-group">
<label class="control-label col-sm-5" for="time_stop">Job Date:</label>
<div class="col-sm-7">
<%= f.text_field :jobdate, :id => @appointment.jobdate, "data-provide" => 'datepicker', @appointment.jobdate, class: "form-control" %>
</div>
<script>
$(function() {
$( "#jobdate" ).datepicker();
});
</script>
</div>
The error message:
/home/ubuntu/workspace/agss/app/views/appointments/_form.html.erb:95: syntax error, unexpected ',', expecting => ...epicker', @appointment.jobdate, class: "form-control" );@out... ... ^