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
sagar@sfdcsagar@sfdc 

How to provide range of years in visualforce page for inputfield date type

hi,

 

How to mention or provide limit(range of years) of years in visualforce page for <apex:inputfield> date type datafield.

 

 

thanks

sagar

RajiiiRajiii

 

You can add validation rule about that limitation in respective object, other way you can add trigger checking for that field with in the range.

 

Or you can use the SelectList tag instead of inputfield which is contain all years with in range.