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
rajasfdcrajasfdc 

how to put date in vfpage?

how to put date in vfpage?i mean tosay.what is the way to put date in vfpage.is there any need to create a classs for this.

tukmoltukmol

as everybody knows, create a date field in your object/custom object and bind it to an inputfield in the VF page. salesforce automatically creates picker for it.

 

or if you just want an input field in vfpage form that behaves like a  date field bound input, you can do it like this:

 

<apex:inputText id="dateField" onfocus="DatePicker.pickDate(true, this.id, false);"/>

//note id is required.