Well, after reading, Active Record accepts in 2 way, but both with separated fields, as follows: (with "column" as the date column name)
way 1: column_year column_month column_day way 2: column_1i column_2i column_3i which rails passes it to Date.civil However, jquery datepicker sets only 1 form element. Through Jquery API, the best approach to this is to use the onSelect trigger to set 3 hidden fields, and put that as default in the AS datepicker bridge. Does anyone have better ideas? For now, i will use your "hack" since is a lot faster. However i would like to fix that into AS. cheers, On Tue, Jun 28, 2011 at 1:25 PM, Jason Fleetwood-Boldt <[email protected]> wrote: > > > last time I ran into that problem I think I just put a special hack on the > model and did a split("/") and just reconstructed the date on the back-end. > like I said, "hack" > > (when I did it I was not using activescaffold, so I can't speak to how well > such a strategy will play with activescaffold) > > > On Jun 28, 2011, at 1:11 PM, Hernan Astudillo wrote: > >> Hi all, >> >> date_picker works fine on the output, localizing, rendering, posting >> back, all good. >> But, POST received, date comes localized like "11/02/1980", which >> rails doesn't like. >> >> I remember that default date select from rails, the attribute comes >> posted as something like: >> >> :some_date =>{"1i" => "11", "2i" => "02", "3i" => "1980"} >> >> or so >> >> Does someone have experience this problem? anyone can give me a clue >> on what i'm missing? >> >> >> cheers, >> >> -- >> You received this message because you are subscribed to the Google Groups >> "ActiveScaffold : Ruby on Rails plugin" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/activescaffold?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "ActiveScaffold : Ruby on Rails plugin" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/activescaffold?hl=en. > > -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en.
