I am looking for some advice on how to make a date select display only valid days of the year. The standard date helper allows for you to choose 31 days for every month of the year. Since not all months have 31 days this can lead to invalid date entries for scheduling. I am thinking that an approach where I have a drop down for month and then use AJAX or normal client side javascript to update a day drop down is the way to do things. Has anyone released any code that does this? Thank you, Matthew Margolis blog.mattmargolis.net
Michael Modica
2006-Jul-31 21:44 UTC
[Rails] Re: date_select for valid days only. No Feb 30
Matthew, Have you considered using the date_box engine? The popup has the days of month correct. Regards, Michael -- Posted via ruby-forum.com.
Matthew Margolis
2006-Jul-31 22:27 UTC
[Rails] Re: date_select for valid days only. No Feb 30
Michael Modica wrote:> Matthew, > > Have you considered using the date_box engine? The popup has the days > of month correct. > > Regards, > > Michael > >While interesting this does not quite meet my needs. I require a date selector that is a drop down or calendar view, the whole text box entry thing won''t fly for my current project. Any other suggestions for date selectors that only show days that actually exist? Matthew Margolis blog.mattmargolis.net
Michael Modica
2006-Jul-31 23:12 UTC
[Rails] Re: Re: date_select for valid days only. No Feb 30
Hi Matthew, date_box is a calendar view based on the dynarch js calendar! While it is true it is surrounded by a text input field, you can easily disable the field so that a user doesn''t type into it. The Calendar image goes right next to the field, but you could change that too so that the onclick of the field itself pops up the calendar. The calendar is very nice looking and it is themed so you can change the look and feel if so desired. Anyway, just my suggestion. If you want to see a screenshot of the way it looks then let me know and I''ll email you one privately. codeslush at yahoo dot com Note - I just made changes to date_box engine and posted an entry here last night with the mod (very basic). The way it all works is fresh in my head and would be happy to help you out. Regards, Michael -- Posted via ruby-forum.com.