pauladaniel / calendardateselect

Automatically exported from code.google.com/p/calendardateselect
Other
0 stars 0 forks source link

My date won't be the default selected date. #159

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I can't get the calendar to select my date it only selects today.
I'm using:

In application head:
<%= javascript_include_tag :defaults %>
  <% CalendarDateSelect.format=(:iso_date)%> 
  <%= calendar_date_select_includes "silver" %>

in form:
<%= calendar_date_select_tag "project[startdate]", @project.startdate,
:embedded => true, :year_range => 1.years.ago..-1.years.ago %>

Original issue reported on code.google.com by mid...@gmail.com on 15 Feb 2009 at 5:44

GoogleCodeExporter commented 8 years ago
Hey I am having a similar problem when I changed the locale to French.

<%= calendar_date_select_includes nil, :locale => 'fr' %>

<%= calendar_date_select_tag "select_dt", session[:selected_dt], :year_range =>
[0.years.ago, 10.years.from_now], :popup => :force, :hidden => true %>

When locale is English, everything works as expected. When changed, the 
selected date
doesn't stick at all and the calendar keeps returning Today's date.

Version: calendar_date_select-1.13.tgz

I hope this can be fixed soon.

Thanks for a nice gem!

Original comment by long...@rogers.com on 31 Mar 2009 at 4:05

GoogleCodeExporter commented 8 years ago
Update:

Upgraded to calendar_date_select-1.15.tgz - calendar is returning the correct
selected date. However, it can't seem to make the selected date stick visually, 
when
the popup is reopen.

If an initial selected date (2009-03-20) is specified when calendar is created, 
it
won't stick either. Calendar would just show today's date. This only happens 
when
locale is not English, though I am only testing with French locale.

Original comment by long...@rogers.com on 31 Mar 2009 at 6:50