SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding tabindex attributes to date_select

    How do you add 'tabindex' attributes to each select element (day, month, year) when using the date_select helper?

    There is an entry on http://wiki.rubyonrails.org/rails/pa...estionOfTheDay that says to use gsub, but I can't figure out how that would work.

  2. #2
    SitePoint Guru
    Join Date
    Aug 2005
    Posts
    986
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think this isn't possible with date_select. You can use sub of course but that's an ugly hack.

    Anyway:

    Code:
    <%= date_select(...).sub('<select', '<select tabindex="..."') %>


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •