When I use

<apex:inputField value="{!DateOfBirth}" label="Date of birth"/>

I can not pick privious year

date picker

How I can pick 1960 year


You should try onfocus="DatePicker.pickDate(false, this, false);"

<apex:inputField value="{!DateOfBirth}" label="Date of birth" onfocus="DatePicker.pickDate(false, this, false);"/>

<script type="text/javascript">
    $j = jQuery.noConflict();
    $j(document).ready(function() {
        var cYear = new Date().getFullYear() ;
        var startYear=(cYear - 110);
        var endYear=(cYear + 25);
        var htmlStr='';
                htmlStr += "<option value=\""+i+"\">"+i+"</option>";
        $j('#sidebarDiv #hideThisHomePageComp').parent().parent().hide();
    } );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.