Giles Bowkett
2006-Jul-20 21:39 UTC
[Rails] cleanest, least hideous way to do dropdown date validation?
My customer has dropdowns like this: Year Month Day If you submit with month selected and year blank, it subs in a year arbitrarily. Worse still, it subs in the year 5. I have no idea why. It seems a pernicious default. Anyway, they''re developing an app, they''re a designer turned coder, turning to a real programmer (me, allegedly) to make sense of the madness they''ve created. Obviously I could write something in JavaScript to handle it. What I want to know is, what is the most elegant way to do this? What is the least clunky way? Does something like this exist already? I''ve been googling and found little but it seems something should and would. All I want to do is say "you can''t hit submit if you''ve selected only one of the three dropdowns. Either you select all three, or none." -- Giles Bowkett http://www.gilesgoatboy.org
Tom
2006-Jul-21 06:49 UTC
[Rails] Re: cleanest, least hideous way to do dropdown date validati
Giles Bowkett wrote:> Obviously I could write something in JavaScript to handle it. What I > want to know is, what is the most elegant way to do this? What is the > least clunky way? Does something like this exist already? I''ve been > googling and found little but it seems something should and would. All > I want to do is say "you can''t hit submit if you''ve selected only one > of the three dropdowns. Either you select all three, or none."I use a javascript popup calendar instead of the ugly triple dropdown method for dates. I use this one: http://www.dynarch.com/projects/calendar/ -Tom -- Posted via http://www.ruby-forum.com/.