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
Abhishek Singh 116Abhishek Singh 116 

<apex:InputText> is not passing value to the controller variable.

I have a inputText field in visualforce page like below:
<apex:inputText id="brhdate" size="10" value="{!findValue}" onmouseover="initialiseCalendar(this, '{!$Component.brhdate}')" />

I used Get, Set in the controller like below:

public String findValue { 
get { 
       Date dt = contact.Birthdate;
       findValue = dt.format();
        return findValue;}
Get function is simply fetching the existing Birthdate value from contact in locale format and returning string.

Now in my main class when I use this variable, it didn't give the value which I changed in visualforce page.
public PageReference saveChange() { 
        contact.Birthdate = Date.parse(findValue);
        System.debug('Value of findValue ' + findValue)

When I click on save button, I only get the value which exist in the contact record already. I am not getting the new value which I changed in VisualForce page. Please help.

Thank you in advance!!