I have used date picker for selecting date of birth of the user. I have set the minDate and maxDate such that the user should be no older than 60 and no younger than 20.
I have used "c-n:c+n" for showing all the years in the range, which now display in a scroll box.
But for the months, it displays months only before the current month. i.e. if today's date is 18-Nov-2012, as per the above options having been set, date picker shows "Jan" - "Nov" in the months panel. "Dec" is missing.
Has anybody faced the same situation? Could anybody help me out with this problem?
Setting the maxDate to '-20y' subtracts that from today's date. Since it is currently November you cannot select December of 1992 since that would be less than 20 years ago. Also, you should specify the yearRange as '-60:-20' to keep it synchronised with the min/max dates. Including the 'c' makes the years relative to the currently selected date, meaning that if you selected a date in 1952 you would then only see the years 1952 to 1972 (based on your original 'c-60:c+20'). Without the 'c' they are relative to today's date and won't change.