You need to sign in to do that
Don't have an account?
BBajaj
How to show previous years in date field on VF page?
I have one VF page on which i have shown one date field using input field ie "User's Date OF Birth" .
Problem is calendar widget is showing years 2011 onwards but i need it to be showing previous years say 1950 onwards.
Strangely enough, it is not possible. The visualforce datepicker only goes so far back and that cannot be changed.
Here is a suggestion of how to work around it - I've had a quick read and it looks OK but I have not tried it myself.
http://codebycody.com/2011/05/13/fix-for-salesforce-com-date-picker-year-limitation/
Home Page Components no longer allow JavaScript. It seems like SFDC is dead-set on ruining the lives of developers.
The link I mentioned was wrong, sorry. Since it's a VF page you are asking about, you can put a Javascript widget into it directly. It is a bit of work getting Javascript to work with VF but there are tips and tricks online
Hi there,
I am the author of the article that sfdk posted. BTW, thanks sfdk.
For a visualforce page you can just paste in the following code inside the apex:page tags. Just reember to modify the startYear and endYear variables
I just tested JavaScript in a home page component in Spring12 and it seems to still work. One thing I have noticed is that it does not like JavaScript comments for some reason. This is the code I tested with: