Forum: Ruby on Rails date_select and default values?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
26428b76b6e3b9173ff0d1ab10da8139?d=identicon&s=25 Ram (Guest)
on 2006-12-22 17:33
    Hi,

    In a form, I have a date_select field. But it always
    defaults to today. Can I have my value? For example,

  <%= date_select 'xx', 3, "value" =>
Date.strptime("2006-12-25","%Y-%m-%d") %>

   does not initialize the field with my value?

   Thanks,
   Ram.
This topic is locked and can not be replied to.