DatePicker in VF page


Tried and tested this easy way.
Use <apex:input> tag and refer the date variable in apex controller,which Shows up in date picker format
VF Page:
 <h4><b>Sample date: </b></h4>
                           <apex:input type="date" value="{!sampleDate}"/>

Controller:

public Date sampleDate{ get; set; }
         public pagereference saveRec(){ 
         }

Result:











Comments

Popular posts from this blog

Embed Special Characters in VF Page

Error: Compile Error: Illegal conversion from String to System.PageReference

Some Common Errors in the Visual flow