2

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

2

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='';
        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>

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.