intialize it first
views/jobby_jobs/show.html.erb
.strftime("%a, %b %d")
views/jobby_jobs/index.html.erb
.strftime("%a, %b %d, %y")
RESUME
jobby_job.js.coffee
jQuery ->
$('#jobby_job_resume_to_be_sent').datepicker
dateFormat: 'yy-mm-dd'
$('#jobby_job_resume_actually_sent').datepicker
dateFormat: 'yy-mm-dd'
Gemfile
gem 'jquery-ui-rails'
application.js
$(document).on("page:load ready", function(){
$("input.datepicker").datepicker();
});
INTERVIEW
jobby_job.js.coffee
$('#jobby_job_interview').datetimepicker({
locale: 'ru'})
<div class="three columns">
<div class="field">
<%= f.label :interview %><%= f.text_field :interview, 'data-behaviour' => 'datepicker' %>
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</div>
===
Gemfile
gem 'momentjs-rails', '>= 2.9.0'
gem 'bootstrap3-datetimepicker-rails', '~> 4.17.37'
application.js
$(document).on("focus", "[data-behaviour~='datepicker']", function(e){
$(this).datepicker({"format": "yyyy-mm-dd", "weekStart": 1, "autoclose": true})
});