0

I want to know how we can implement a custom date field in vf page which will display only month and year.

Regards

  • Sid does my ans helped ? – Ratan Paul Jan 30 '16 at 15:11
  • Hi Ratan.. Sorry for the delay..i am looking for inputtext from user...the user is going to do the input by selecting the month and year..outputtext is used for displaying the date.. – hellraizer Feb 1 '16 at 8:56
2

Use this.. instead {!now()} pass your custom field {!CutomObject.FieldAPIName__c}

<apex:outputText value="{0, date, MMMM','  yyyy}">
      <apex:param value="{!now()}" /> 
</apex:outputText>

Output

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.