I have used date field in my visualforce page.By default the datpicker is showing values upto year 2012.but i nedd to insert few more years before 2012.How can i implement this as it is the default calendar provided by salesforce.
I have used date field in my visualforce page.By default the datpicker is showing values upto year 2012.but i nedd to insert few more years before 2012.How can i implement this as it is the default calendar provided by salesforce.
Best Answer
It's a lot of tweaking to get this injected into standard pages... worst case, just type the year in :P reinventing vs decorating the native picker is an interesting debate, all of us with unique circumstances!
Setup > Customize > User Interface
Check [X] Show Custom Sidebar Components on All Pages
Create a new Home Page Component (HTML, narrow) called "Date Picker Years" containing:
Place that Component on your Home Page Layout.
Edit - was asked for some explanation:
(function() { ... }());
prevents vars polluting the global scopewindow.onload
function, store it and call it (interceptor pattern)calYearPicker
could disappear any time; if so, "get out of dodge quick" by returning early