Rails datepicker Autofil to field with 10 days from the selected date on from field
$('.datepicker').datepicker({format: "yyyy/mm/dd"})
<div class="bg-body-light mb-3 ">
<%= form_tag profile_path, method: "get" do |f| %>
<%= hidden_field :daily, :value => true %>
<div class="fields">
<div class="form-row align-items-center m-3 pt-3">
<div class="col-auto">
<p>
<strong><%= I18n.t 'profile.form.from' %></strong>
<%= text_field 'from',nil, class: 'form-control datepicker',placeholder: (I18n.t 'profile.form.from') %>
</p>
</div>
<div class="col-auto">
<p>
<strong><%= I18n.t 'profile.form.to' %></strong>
<%= text_field 'to',nil, class: 'form-control datepicker',placeholder: (I18n.t 'profile.form.to') %>
</p>
</div>
<div class="col-auto">
<%= button_tag( class: "btn btn-sm btn-outline-primary btn-rounded search-button-style") do %>
<i class="fa fa-search"></i>
<span><%= I18n.t 'search' %><span>
<% end %>
</div>
</div>
</div>
<% end %>
I have added a datepicker field on rails view. (from and to fields). This is my form. I want the to field automatically filled once I select the date on from field with 10 days later.from=(2020/01/20) then to field to be auto to(2020/01/30). Also I donot want to use date-select, because i need it in same design that It is now, but Can I disable the input field with only select the datepicker but no typing of any string?