Date validation in combobox date picker
Posted: Fri May 15, 2009 11:47 pm
Hi, I am trying to create a date picker like the one on the main facebook page where you can register, the cool thing about it is that it is easier for the end user to select their birth date that way instead of a calendar type of widget, and the best thing is that it validates those special dates like february that some years has 29 days and others 28 (I forgot how those years are called
).
I found the following sample by googling but I just can't seem to be able to put it inside a DIV element:
http://www.java2s.com/Code/JavaScript/G ... mboBox.htm
It always gets printed out at the beginning of my page and it is frustrating me.
Does anyone know how to create a custom validation for this type of date pickers? Can you point me to the right direction?
I guess in theory if the user selects a month that has different days the combobox with the days gets automatically updated with the maximum number of days that the selected month can have, and also the same thing when the year is changed, february days should be limited to the maximum allowed for that year (And I don't know if any other month changes year after year...), I just don't have enough experience in JavaScript
Thanks!
I found the following sample by googling but I just can't seem to be able to put it inside a DIV element:
http://www.java2s.com/Code/JavaScript/G ... mboBox.htm
It always gets printed out at the beginning of my page and it is frustrating me.
Does anyone know how to create a custom validation for this type of date pickers? Can you point me to the right direction?
I guess in theory if the user selects a month that has different days the combobox with the days gets automatically updated with the maximum number of days that the selected month can have, and also the same thing when the year is changed, february days should be limited to the maximum allowed for that year (And I don't know if any other month changes year after year...), I just don't have enough experience in JavaScript
Thanks!