I have a custom field which is called Date__c (It's a Date field type) and I want to display it on a custom VF page.

  <apex:inputText value="{!workLog.Date__c}" styleClass="date form-control"/>

The problem is that I get a text box and not a calendar as I expect to see.date

How can I make it show the calendar?

I searched all over this forum but with no success, I only found this post which suggested to use something like this:

<apex:input value="{!workLog.Date__c}" type="date" />

but it produced this error:

Error: <apex:input> does not support fields on a Salesforce object. 
Use <apex:inputField> for expression '{!workLog.Date__c}'

Please assist

1 Answer 1


Change your code to

<apex:inputfield value="{!workLog.Date__c}" styleClass="date form-control"/>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .