For a number of apex:inputfields in Visualforce, I'm suppressing the Salesforce date picker and using the browser based one. I'm experiencing odd behaviour when attempting to do so on the Task ActivityDate field:
Example
Markup:
<apex:page controller="TestController" docType="html-5.0">
<apex:form id="theForm">
<apex:inputField value="{!t.ActivityDate}" showDatePicker="false" type="date"/>
</apex:form>
</apex:page>
Controller:
public with sharing class TestController {
public Task t{get; set;}
}
When trying to compile the VF code, I get the following error:
Expected input type 'datetime-local', got 'date' for Date data type
I don't get this error for other Date fields in the database, which have all worked fine. I've also checked the DisplayType for the field and is definitely is being returned as a Date field like all the others.
Out of interest, I gave the compiler what it wanted and changed the type to "Datetime-local" and it saved fine. However, running the page produced an Internal Server error.
Has anybody else run across this issue and resolved it? Or is the answer to create a controller variable to proxy for the ActivityDate field?