kristianmandrup / ui_datepicker-rails3

jQuery UI datepicker integration for Formtastic, Simple Form and Active Admin
MIT License
50 stars 15 forks source link

localization returns an error #6

Open ilyakatz opened 12 years ago

ilyakatz commented 12 years ago
Formtastic::Inputs::UiDatePickerInput#input_html_options

has a line

super.update(:class => new_class, :value => localized(value))

which fails because value returns a formatted string so I18n.localize(value) throws an exception.

Should it be something like this?

  super.update(:class => new_class, :value => localized(object.send(method)))
kristianmandrup commented 12 years ago

yes, I think someone posted a similar issue. Please fix it and issue a pull request. Thanks :)