I have an option list.
I have a fixed date to go by, for example 2012-01-01. Option list, the monthly intervals: eg 2-10 months 7-15 months 11-25 months 14-25 months 18-30 months 30-100 months
I have seen option lists that c开发者_如何学Change the content depending on what you choose in the other lists / other.
Now I would like to have an option list that shows only some choice in my option list, whichever the user specifies in the date box. If the user eg enter 2013-01-01, all choices should appear to match 2012-01-01, that is 7-15 months and 11-25 months.
Does anyone have any suggestions?
you should find happiness with DateJs ans its clear API to find the number of month to the first date. Then you can know which option of the select to choose based on this value
精彩评论