maskedinput with multiple formats?

maskedinput with multiple formats?


hello
i'm using the maskedinput together with datepicker .
i want to give the user different valid possibilities when entering a
date:
- only the year (4 digits)
- year and month (mm.yyyy)
- year, month and day (dd.mm.yyyy)
since it's german date format, i cant just check if the entered value
is > 4 digits :/
anyone knows a solution for that problem?
thanks a lot
stefan