tobico/jquery-calendrical — Issue #17: Time range end_time is improper
Author: swapnilchincholkar
Created: 2011-11-21 08:50:07+00:00
State: open

I am using this in my ROR code, I am using this to set opening and closing timings for shop.
default time I show to user is 10:30 AM as start_time and 11:30 PM as end_time for 7 days, I am running a loop
and in it I am setting these values in text fields, issue is when i click over end_time then
I get drop down of timing from start time i.e 10:30 AM till 1:00 PM with correct diffrance with start_time, but
it should show my default time 11:30 PM as end_time.

javascript is
$(document).ready(function() {
for(var i = 0; i < 7; i++) {
$("#time_start"+i+", #time_end"+i).calendricalTimeRange();
}
});

<% ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'].each_with_index do |wd, index| %>
<%= text_field_tag "shop_timings_attribute[start_time][]", "08:30AM",:readonly => "readonly",:id => "time_start#{index}" %> to
<%= text_field_tag "shop_timings_attribute[end_time][]", "11:30PM",:readonly => "readonly",:id => "time_end#{index}" %>
<% end >