I was going to say another option is making a rich type based off date/
timestamp and defining the view for it.  I think I did something like
that for a birthday field, since you never want future dates and a
bigger range in the past than a standard date picker.

On Nov 16, 8:27 am, Matt Jones <[email protected]> wrote:
> On Nov 16, 2010, at 7:12 AM, jaclinuxhelp wrote:
>
> > Thanks Matt, that will surely work.
>
> Actually, I just remembered that it won't (at least for :datetime fields):
>
> https://hobo.lighthouseapp.com/projects/8324/tickets/598
>
> Apparently I reported the bug and then promptly forgot about it. :)
>
> You can, however, combine the first technique with a specific view tag:
>
> <def tag="view" for="ActiveSupport::TimeWithZone" attrs="format"><%= this && 
> (format ? this.strftime(format) : this.to_s) %></def>
>
> to get properly behaved datetime fields.
>
> --Matt Jones

-- 
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