ruby on rails - How to implement bootstrap datepicker with text_field? -
i want use bootstrap datepicker text_field inside form_for. how should rewrite
<%= f.text_field :some_date %>
line store selected date in some_date field?
date time picker support input
type direct integration. rails text_field
create text area
. can't directly.
you can either integrate datetimepicker onclick or mousedown event. can div/span
.
if want need override datetimepicker code check supported html elements.
code below should change : link here
attachdatepickerelementevents = function () { input.on({ 'change': change, 'blur': options.debug ? '' : hide, 'keydown': keydown, 'keyup': keyup, 'focus': options.allowinputtoggle ? show : '' }); if (element.is('input')) { input.on({ 'focus': show }); } else if (component) { component.on('click', toggle); component.on('mousedown', false); } },
Comments
Post a Comment