If I understand correctly, everything is working OK with the picker, it's just when you go to submit the form the value does not persist to the database?
Perhaps there is a problem with the date parsing logic. Have you used the ruby debugger before? In the appropriate place (your sample controller save method likely) I'd write the following line:
puts @sample.shipping_date
@sample.shipping_date = params[:sample][:shipping_date]
puts @sample.shipping_date
See if the value changes properly. If not, use the debugger to step in. Something like this would get you going:
puts @sample.shipping_date
require 'ruby-debug'; debugger
@sample.shipping_date = params[:sample][:shipping_date]
puts @sample.shipping_date
See the ruby-debug help page for commands.
If the value IS being changed properly, then something is setting it back, or the model may not be saved at all. Check to see if @sample.valid? is true… if not, look at @sample.errors
Narrowing down where the value fails to perpetuate will be most helpful.
Tim
> --
> You received this message because you are subscribed to the Google Groups "calendar_date_select" group.
> To post to this group, send email to calendar_d...@googlegroups.com.
> To unsubscribe from this group, send email to calendar_date_se...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/calendar_date_select?hl=en.
>
> Thanks Tim ! It's fixed !
> Your 3 lines in the controller clearly showed the value could be updated properly
Glad to have been of service!
>
> It was such a stupid error on my part. Your suggestion that perhaps it was being erased after the fact made me see another line in the view that used " text_field :shipping_date" that should not have been there. It was left over from a merge of two forms and was resetting the value.
>
> I have tried to get the debugger running in the past without success - I will try again and perhaps try posting on IRC or in groups if I am stuck
That's right… you're still on windows. I know many windows users use ruby-debug successfully… I remember getting it to work back when I was on windows.
May have to end up building your own ruby with mingw… cygwin may work but suffers performance wise with FS access due to cygwin filesystem layer. And… both those are probably more than your looking to do :)
You might try this: http://rubyinstaller.org/ … I'm sure they've ironed out the gems that have to compile c code.
Tim