pauladaniel / calendardateselect

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

Incorrect JS date parsing behavior with American formatting turned on #151

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
(using Ruby on Rails 2.1)

What steps will reproduce the problem?
1. enable American formatting (CalendarDateSelect.format = :american)
2. use <%= calendar_date_select_tag %> view logic
3. click on the calendar icon

What is the expected output? What do you see instead?

It appeared that there were some errors in format_american.js that were
causing the CalendarDateSelect panel to miscalculate the exact time that it
was pulling up from the input. If the INPUT tag had a VALUE="1/2/2008 11:25
PM", it would instead show "1 PM" or something like that in the default
OPTION tag.

What version of the product are you using? On what operating system?

Latest gem, with Rails 2.1, Ruby 1.8.6 on top of OS X Leopard

Please provide any additional information below.

I've attached a patch that resolved the issue for me. 

Original issue reported on code.google.com by mesozoic on 2 Jan 2009 at 8:32

Attachments: