datetime range of years seems limited

14 views
Skip to first unread message

Fred

unread,
Jan 7, 2015, 5:31:32 PM1/7/15
to plataformate...@googlegroups.com
Am making good progress with RoR and SimpleForm - so a big thank you to all who have contributed along the way.

My problem code is very simple:

 <%= f.input :occurred_at %>

And it all worked well until I got some test data that required a date in 1979: then the year part of the input would not go back beyond 2010.

Have read and scanned and searched without finding a way past this.

Anyone know the answer to this?

Thanks

Carlos Antonio da Silva

unread,
Jan 10, 2015, 2:39:13 PM1/10/15
to plataformate...@googlegroups.com
This functionality is provided by Rails' date_select helper, you can give it options like start_year and end_year for example.

Take a look at the documentation for this method to see other options available.

Hope that helps! :)

--
You received this message because you are subscribed to the Google Groups "SimpleForm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-simp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
At.
Carlos Antonio

Fred

unread,
Jan 10, 2015, 5:17:09 PM1/10/15
to plataformate...@googlegroups.com
Thank you kindly - it really does help!


On Saturday, January 10, 2015 at 7:39:13 PM UTC, Carlos Antonio da Silva wrote:
This functionality is provided by Rails' date_select helper, you can give it options like start_year and end_year for example.

Take a look at the documentation for this method to see other options available.

Hope that helps! :)
On Wed, Jan 7, 2015 at 8:31 PM, Fred <alastair...@gmail.com> wrote:
Am making good progress with RoR and SimpleForm - so a big thank you to all who have contributed along the way.

My problem code is very simple:

 <%= f.input :occurred_at %>

And it all worked well until I got some test data that required a date in 1979: then the year part of the input would not go back beyond 2010.

Have read and scanned and searched without finding a way past this.

Anyone know the answer to this?

Thanks

--
You received this message because you are subscribed to the Google Groups "SimpleForm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plataformatec-simpleform+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
At.
Carlos Antonio
Reply all
Reply to author
Forward
0 new messages