I just tried to introduce a new date field on an old Visualforce page like this:

<apex:input value="{!fromDate}" type="date" label="From:"/>

In the controller the variable is defined like this:

public Date fromDate { get; set; }

This works nicely but if I want to deploy this to production via a change set I get an error:

Input type 'date' does not support ANY data type. Try setting type to 'text'

Any idea what causes this at the time of deployment? Is this one of those weird "Salesforce does something completely different when deploying" kind of situations? I don't even understand what that error means.

  • That's pretty bizarre. Assume you're deploying the page and the controller together and it's not down to a mismatch?
    – Matt Lacey
    Jun 7, 2021 at 2:18

1 Answer 1


Try using type="auto" instead of type="date".

<apex:input value="{!fromDate}" type="auto" label="From:"/>
  • 1
    I'd be hesitant to use "auto" over a more specific type. Perhaps this could be useful in debugging, but I would not deploy this to a production org.
    – Derek F
    Jul 2 at 22:23
  • I agree. However, I did not try it because I resolved this via a different solution.
    – Semmel
    Jul 4 at 0:00

You must log in to answer this question.

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