Activity Forums Salesforce® Discussions How to create a date picker in the Visualforce page?

  • Marziya

    Member
    June 5, 2020 at 2:32 pm

    hii Shweta,
    1st. You have to simply use apex:inputfield and bind the field with date type field and it will automatically take the Sales force Calander.Given example
    <apex:page standardcontroller=’Account’>
    <apex:form>
    <apex:inputfield value=”{!Account.DateTypeField}”
    </apex:form>
    </apex:page>
    Please go through this link https://developer.salesforce.com/forums/?id=906F000000097bvIAA

    • This reply was modified 4 years, 5 months ago by  Marziya.
  • Anuj

    Member
    June 8, 2020 at 1:44 pm

    Visualforce page:
    <apex:page controller="datePicker" id="mypage">
    <apex:form>
    Date: <apex:inputText value="{!datename}" size="10" id="demo" onfocus="DatePicker.pickDate(false, this , false);" />
    </apex:form>
    </apex:page>
    Apex Controller:
    public class DatePicker
    {
    public String datename {get; set;}
    }

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos