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
new2forcenew2force 

How to make calendar popup in custom VF pages

Hi, i am creating a custom visual force page and I want calendar popup or suggestion.

 

<apex:page standaqrdcontroller="Contact" extensions="infoControler">

 

<apex:inputField value="{!con.BirthDate}"/>

 

in controlller,

Contact con;

 

public void setCon(Contact newCon)

{

   con=newCon;

}

 

Iam not getting any popup calendar but todays date beside field is coming. I see in the Contact  Page when we click mouse inside the box, it is giving us calendar . but not in my case.

 

 

Can someone  help me out here .   Thanku

 

public Contact getCon()

{

  return con;

}

cloudcodercloudcoder

Is the BirthDate field of type Date or DateTime?

new2forcenew2force

In the contact objedt , BirthDate is of "Date" Date type

sales4cesales4ce

The BirthDate field is a standard field on Contact Object.

This code should do the trick without a need for controller extension.

 

<apex:page standardController="Contact" >
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockSection >
                <apex:inputField value="{!Contact.birthDate}"/>
             </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
  
</apex:page>

 

 

Sales4ce

Sonya Dhand 3Sonya Dhand 3
Hi 
I have a date field popping up as a calendar also but it is being cut off

User-added image

Any ideas?

Many thanks

Sonya