function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
freshstart forcefreshstart force 

Date Picker Problem

The Date Picker shows only few Years from (2009 to 2015) or something. I would like to accept the Date of Birth as input and I would like to list all years in the Date picker Year dropdown. Is there any way I can do it declaratively? If its not possible in the declarative manner, is there any solution that does not require me to write the whole apex sheebang for that particular page? Even if writing a complete apex, page is the only solution, please confirm it.



Thanks in Advance

freshstart force

VRayVRay

I don't believe there is a way to expand the number of years displayed in the standard SF date picker, however I know that this can be done via jquery... Check out the link below:

 

http://jqueryui.com/demos/datepicker/#dropdown-month-year

cgiocondacgioconda

Pradeep, when I try to access your link, it throws a Forbidden error:

 

Forbidden

You don't have permission to access /Visualforce-Development/Separate-Date-and-Time-Picker/td-p/189627 on this server.

 

What was described on this page? I have a client with this same issue and would love to find a resolution that doesn't involve JQuery...thanks!

 

Chris Gioconda

sfdcfoxsfdcfox

jQuery is the easiest of the solutions, because otherwise you'd have to write your own custom date picker for the field. The year dropdown is not modifiable; it is written into the JavaScript library used by Salesforce.