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
Ivana Miserda 6Ivana Miserda 6 

ERROR: Value '2016-07-28 00:00:00' cannot be converted from Text to com.force.swag.soap.DateOnlyWrapper

I have a VF Page that expects a date in HTML field, and onclick of a button - the value is being binded to 

<apex:inputHidden value="{!CaseRecord.StartDate__c}">

I am getting the Value '2016-07-28 00:00:00' cannot be converted from Text to com.force.swag.soap.DateOnlyWrapper error.

Can anybody help out why is this happening and what is the workaround? I see that people used String or similar, but i am binding this directly to the record field. Having temporary String variable on the page and then binding the value on the controller is not an ideal solution, does anybody have any other idea?

Thank you

VineetKumarVineetKumar
This is a known error of salesforce. Refer the below link and the possible workaround for it (suggested by salesforce)
https://success.salesforce.com/issues_view?id=a1p300000008dpwAAA

Why are you not using the apex:inputField in your page?