Activity Forums Salesforce® Discussions How can I increase the Standard Date field year Range in Visualforce?

  • Manpreet

    Member
    April 25, 2018 at 2:21 pm

    Hi Saloni,
    Add the following script to your visualforce Page :

    $(document).ready(function() {
    var startYear=2000;
    var endYear=2050;
    var optionsString='';
    if(startYear

  • Parul

    Member
    September 12, 2018 at 5:02 am

    Hi

    $j(document).ready(function() {
    var startYear=1985;
    var endYear=2024;
    var htmlStr='';
    if(startYear<endYear){
    for(i=startYear;i<endYear+1;i++){
    htmlStr += "<option value=""+i+"">"+i+"</option>";
    }
    $j('#calYearPicker').html(htmlStr);
    }
    $j('#sidebarDiv #hideThisHomePageComp').parent().parent().hide();
    }
    );
    </script>

     

    Thanks

  • shariq

    Member
    September 15, 2018 at 1:50 pm

    Hi,

    I found this online -

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos