# Limit Months displayed select\_date

**URL:** <https://www.ruby-forum.com/t/limit-months-displayed-select-date/174103>\
**Category:** Deployment\
**Created:** [August 20, 2009, 10:06pm UTC](https://www.ruby-forum.com/t/limit-months-displayed-select-date/174103 "2009-08-20T22:06:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![knappe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/5fc32e/32.png) [@knappe](https://www.ruby-forum.com/u/knappe)\
**Post date:** [August 20, 2009, 10:06pm UTC](https://www.ruby-forum.com/t/limit-months-displayed-select-date/174103/1 "2009-08-20T22:06:18Z")

</div>

I have the following code:

\<%#= select\_date(Time.now, :order =\> [:month, :day, :year],  
:datetime\_separator =\> ‘-’, :time\_separator =\> ‘:’, :discard\_seconds =\>  
true, :discard\_minutes =\> true, :start\_month =\> Time.now.month.to\_i,  
:end\_month =\> Time.now.month.to\_i + 1, :start\_year =\> Time.now.year,  
:end\_year =\> Time.now.year, :prefix =\> ‘start\_date’) %\>

I’m trying to limit the number of months that a user can select, just  
like start\_year. However, month\_start isn’t an option. Anyone know of  
a work around? Is there another way besides select\_date of  
accomplishing this?

Thanks
