Is there something changed in the newest Rails (3.0.5) version
regarding to this?

Since I can't get this working...

I've tried this in my application.dryml

<extend tag='input' for='date'>
  <old-input merge order="day,month,year" start-year="&1990"/>
</extend>

But the date selectors still have the default +-5 years in the
dropdown.

The documentation for the Date Helper is a bit odd, it clearly states
that
the 'date_select' has that option, but I'm not sure about the
'select_date'.
I also tried changing the <input for='date'> tag to use 'date_select',
and
I got the start-year/end-year correct in the form, but since the
implementation
is different, saving the values doesn't work.

Thanks in advance!

-RanzQ


On Mar 9, 11:14 pm, erbecke <[email protected]> wrote:
> hi Sergey
>
> To extend the year range (using Rails 2.x and Hobo 1.0.x) you should
> extend the Date Tag in Application.dryml
>
> for example:
>
> <extend tag="input" for="date">
>    <old-input merge include-blank="&true" order="day,month,year" start-
> year="&1990"/>
> </extend>
>
> in this case my year starts at 1990,
> I changed the field order (to day/month/year format) and accept blank
> dates .
>
> to correct wrong date validations you should use a Rails plugin (it's
> a generic Rails problem) but I didn't use it yet.
>
> best regards,
> eddie.
>
> On Mar 9, 12:34 pm, sergio <[email protected]> wrote:
>
>
>
> > Hello Hobo users.
>
> > Two questions about date[s] in hobo:
>
> > - how can I change the default of 5 years which I get to see in views
> > having a date ?
> > I would like to setup my own range, e.g. Date.today.beginning_of_year
> > - 80.years
>
> > - how can I best patch the 'invalid date' error for cases where the
> > user selects, for example, 31/2 which is invalid.
>
> > The problem comes from
>
> >         if value.is_a? Hash
> >           parts = %w{year month day}.map{|s| value[s].to_i}
> >           if parts.include?(0)
> >             nil
> >           else
> >             Date.new(*parts) <<<<<<<<<<<<<<<<<<<<< HERE
> >           end
> >         else
> >           value
> >         end
>
> > see hobo-1.0.2/lib/hobo/model.rb
>
> > Thanks! This stuff is awesome!
>
> > Sergey

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to