This project is archived and is in readonly mode.

#2807 ✓invalid
judearasu (at gmail)

ActionView::Helpers::DateHelper problem in rails 2.2

Reported by judearasu (at gmail) | June 16th, 2009 @ 09:33 AM | in 2.x

hi i am using date_select helper for displaying month day and year.I am
trying to show month and year by the options of the helper as
<%=date_select( "post", "written_on", :discard_day => true)%>

But i am getting error as
undefined method styled_input' for<br/>

<ActionView::Helpers::DateTimeSelector:0x7f556dbb6678>

Comments and changes to this ticket

  • Andy Atkinson

    Andy Atkinson June 18th, 2009 @ 06:59 AM

    I have Rails 2.2.2 and 2.3.2 installed as gems. I attached a simple app that has a Post model and written_on date field. I was unable to reproduce your error by adding the :discard_day => true option to the DateHelper method. I tried the create and edit forms, and tried with Rails 2.3.2 and 2.2.2.

  • judearasu (at gmail)

    judearasu (at gmail) June 18th, 2009 @ 09:02 AM

    Hi i have checked in your application helper is working fine, but its not displaying the prompt message
    Ex
    <%= f.date_select :created_at,:discard_day => true,:prompt=>{:month=>'Day'} %>

  • Andy Atkinson

    Andy Atkinson June 22nd, 2009 @ 06:17 AM

    Hello. Is the :prompt option a separate issue from the original bug you filed? If so I think it would probably be best to close this one and post a more specific bug.

  • judearasu (at gmail)

    judearasu (at gmail) June 22nd, 2009 @ 07:21 AM

    Yes :prompt option is a separate issue.

  • David Trasbo

    David Trasbo April 11th, 2010 @ 09:00 PM

    • Assigned user set to “Ryan Bigg”

    I wasn't able to duplicate this issue either.

    ➜  code  rails -v
    Rails 2.3.5
    ➜  code  rails date_select
    ...
    ➜  code  cd date_select 
    ➜  date_select  script/generate model post written_on:date
    ...
    ➜  date_select  rake db:migrate
    ...
    ➜  date_select  script/generate controller posts new 
    ...
    ➜  date_select  script/server
    
    class PostsController < ApplicationController
      def new
        @post = Post.new
      end
    end
    
    <% form_for @post do |post| %>
      <%= post.date_select :written_on, :discard_day => true %>
    <% end %>
    

    or:

    <%= date_select("post", "written_on", :discard_day => true) %>
    

    I think this ticket can be marked as invalid, or resolved if it turns out the issue existed in previous versions.

  • Ryan Bigg

    Ryan Bigg April 11th, 2010 @ 09:35 PM

    • State changed from “new” to “invalid”

    Cannot be duplicated.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages