I got problems with ddslicks in my edit form
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put , :multipart => true }) do |f| %>
#some code
<div class="field multi-select three cf">
<%= f.label :date_of_birth %>
<%= f.date_select(:date_of_birth, {:order => [:year, :month, :day],:start_year =>Time.now.year-50, :end_year => Time.now.year }) %>
</div>
<%= f.submit "Update", :class=>"btn-container submit" %>
<% end %>
that generates the next html:
<select id="user_date_of_birth_1i" name="user[date_of_birth(1i)]">
<option value="1962">1962</option>
<option value="1963">1963</option>
....
<select id="user_date_of_birth_2i" name="user[date_of_birth(2i)]">
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
....
<select id="user_date_of_birth_3i" name="user[date_of_birth(3i)]">
<option value="1">1</option>
<option value="2">2</option>
....
at this point everything is good, but when I apply the ddslick it doesn’t work
here is my global.js
$('#user_date_of_birth_1i').ddslick({selectText: "Year", height: 200 });
$('#user_date_of_birth_2i').ddslick({selectText: "Month", height: 200});
$('#user_date_of_birth_3i').ddslick({selectText: "Day", height: 200});
it generates the next html
<div id="user_date_of_birth_1i" class="dd-container" style="width: 260px; ">
<div class="dd-select" style="width: 260px; background-color: rgb(238, 238, 238); background-position: initial initial; background-repeat: initial initial; ">
<input class="dd-selected-value" type="hidden" value="1992">
<a class="dd-selected"><label class="dd-selected-text">1992</label></a>
<span class="dd-pointer dd-pointer-down"></span>
</div>
<ul class="dd-options dd-click-off-close" style="width: 260px; height: 200px; overflow: auto; ">
<li><a class="dd-option"><input class="dd-option-value" type="hidden" value="1962">
<label class="dd-option-text">1962</label></a>
</li>
<li><a class="dd-option"> <input class="dd-option-value" type="hidden" value="1963">
<label class="dd-option-text">1963</label></a>
</li>
....rest of years
</div>
the same for user_date_of_birth_2i(month), user_date_of_birth_3i(days)
when I submit that, it doesn’t save that field. (Im using devise), any help will be appreciate
ok I solved just change the
for this: