What I want to do is when the starting date is selected in the first dropdown, the ending date dropdown automatically jumps to the same date.
Just like in JAL website. Best Example-> http://www.jal.co.jp/
All I could find were stuffs like below but this is not what I want to do.
-http://stackoverflow.com/questions/1974798/javascript-how-to-make-auto-select-another-drop-down
-http://jsajax.com/EditRunDemo.aspx
-http://stackoverflow.com/questions/1966407/how-to-populate-dropdown-with-dynamic-date-based-on-2-other-dropdown-boxes
Does anybody know how to do this?
Please give me some advise….
I’m using rails and jquery, so anything that goes along with them would be great! Thanks!
I use 2 input with type text (
from_dateandto_date), but it’s the same deal as with a dropdown. they look like this:then, using jquery and the datepicker plugin i do this:
as you can see, I’m setting the date format options for the datepicker, and checking to see when something changes in the
from_datebox. if something changes (i picked a date from the calendar), the contents get copied in the second box (to_date).