Closed garthgoldwater closed 8 years ago
you can actually just add.... data-date-format="yyyy-mm-dd" to the html input to format correctly and save the date without additional gems.
<input type="text" data-provide='datepicker' data-date-format='yyyy-mm-dd'>
For Rails4 in the form_for format this worked:
<%= f.text_field :started_on, "data-provide" => 'datepicker', 'data-date-format' => 'yyyy-mm-dd' %>
@duaimei how would you go about adding the nested span and glyphicon so that the text_field
helper generates:
<div class="input-group date">
<input type="text" class="form-control"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
</div>
Since this is a wrapper for a non-rails-specific input, it might be a good idea to put some gotchas in the readme. The three I'm thinking of are
Would probably reduce the number of duplicate issues you see on this project and questions on stackoverflow.