• #66264
    Salesforce | Nikita Nikita #3

    How to get standard date picker custom Visualforce in Salesforce?

    Hi All,

    In custom VF page have to display date fields with date picker, how can i write code for this ?

    there is no standard controller, on custom controller is there for page.



    Salesforce | Deepak Deepak #4

    Please find the below examples to display the date field with date pickers.

    Ex 1 :
    Visual Force Page :
    <apex:page docType=”html-5.0″ controller=”Sample”>
    <apex:form >
    <apex:pageBlock >
    Date: <apex:input type=”date” value=”{!dat}”/>

    Apex Controller :
    public class Sample {
    public Date dat {get;set;}
    public Sample() {


    Ex 2 :
    Visual Force Page :
    <apex:page controller=”datePicker” id=”mypage”>
    Date: <apex:inputText value=”{!datename}” size=”10″ id=”demo” onfocus=”DatePicker.pickDate(false, this , false);” />

    Apex Controller :
    public class DatePicker
    public String datename {get; set;}

Viewing 2 posts - 1 through 2 (of 2 total)

Please to reply to this topic.


We're not around right now. But you can send us an email and we'll get back to you, asap.


About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2020 Forcetalks. All Right Reserved.

Log in with your credentials


Forgot your details?