%- earliest = Time.at(@min_time) latest = Time.at(@max_time) # adjust to fall on day boundaries earliest = Time.utc(earliest.year, earliest.month, earliest.day) latest = Time.utc(latest.year, latest.month, latest.day) today = Time.utc(Time.now.year, Time.now.month, Time.now.day) first_of_month = Time.utc(@year || Time.now.year, @month || Time.now.month, 1) rescue today last_of_month = first_of_month.end_of_month first_day = first_of_month - first_of_month.wday.days last_day = last_of_month + (6 - last_of_month.wday).days d = first_day @object = @object.to_s.gsub(/[^-\w]/, '') @method_prefix = @method_prefix.to_s.gsub(/[^-\w]/, '') -%>
S |
M |
T |
W |
T |
F |
S |
"> _value').innerHTML = '<%= d.strftime('%a %m/%d/%y') %>'; $('<%= "#{@object}_#{@method_prefix}_year" %>').value = <%= d.year %>; $('<%= "#{@object}_#{@method_prefix}_month" %>').value = <%= d.month %>; $('<%= "#{@object}_#{@method_prefix}_day" %>').value = <%= d.mday %>; hideDatePicker('<%= @object %>', '<%= @method_prefix %>'); return false;"><%= d.mday %> <%- else -%> | ">
|
<%- if d.wday == 6 -%>