f.datetime_select remove previous dropdown dates

773 Views Asked by At

I'm having a problem formatting the form_for helper f.datetime_select in ruby on rails.

What I want to do is only show future dates. I'm already doing the correct validation, but I want to eliminate the confusion of a user having the ability to select a invalid/previous date from the drop down.

For example: If today was February 3rd, 2011 the user should not be able to select February 2nd 2011 or January 24th, 2011.

Is there a way to modify the drop down values?

Thanks for your help in advanced!

0

There are 0 best solutions below