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
Masahiro KawataMasahiro Kawata 

Element Value must resolve to a string type!

I have a problem where a date field can be disabled by a checkbox, and this doesn't cause problems - unless it has a date value entered into it when the checkbox is clicked. If it is saved with a date in it, then any attempt to modify the page gives:

<apex:inputText> element value must resolve to a String type!

If the field is left blank, then disabled, this problem does not occur.
How do I disable 'Next_Intake__c' without causing this problem?
Here is the code:
<apex:pageBlockSectionItem >
            <apex:outputLabel value="Next Intake" for="Next_Intake"/>
            <apex:outputPanel id="panel2">
            <apex:inputField value="{!Grant__c.Next_Intake__c}"  rendered="{!Grant__c.On_going__c == false && Grant__c.Not_Accepting_Applications__c == false}"  id="Next_Intake"/><!--required-->
            <apex:inputText value="{!Grant__c.Next_Intake__c}" disabled="true" rendered="{!Grant__c.On_going__c == true || Grant__c.Not_Accepting_Applications__c == true}" />

Thanks for your help.