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
siva@shiva.comsiva@shiva.com 

date formate doesnot take value in visualforce

<apex:inputtext value="{!gt.agreementdate}" size="12" onfocus="DatePicker.pickDate(false, this, false);"/>

Best Answer chosen by Admin (Salesforce Developers) 
siva@shiva.comsiva@shiva.com

<apex:inputtext value="{!gt.agreementdate}" size="12" onfocus="DatePicker.pickDate(false, this, false);" id="demo"/>

 

 

 

its working

 

 

1st.  You have to simply use apex:inputfield and bind the field with date type field and it will automatically take the Sales force Calander.Try the below as Reference:
<apex:page standardcontroller=’Account’>
<apex:form>
<apex:inputfield value=”{!Account.DateTypeField}”
</apex:form>
</apex:page>

2nd.  You can use <apex:inputtext> tag to achieve this:
<apex:page standardcontroller=’Account’ id=”mypage”>
<apex:form id=”myform”>

<apex:inputText styleClass="cssbody" value="{!datename}" size="10" id="demo" onfocus="DatePicker.pickDate(false, 'myPage:myForm:demo', false);" />

</apex:form>
</apex:page>

3rd .

<apex:page >
<apex:form >
<table>

<!-- <input id="demo3" type="text" size="25"><a href="javascript&colon;NewCal('demo3','ddmmmyyyy',true,24)"><img src="images/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a> -->
<!-- NewCal([textbox id],[date format],[show time in calendar?],[time mode (12,24)?]) -->

<td> Date<br></br><input id="t" name="datee" onfocus="DatePicker.pickDate(false,

't', false);" size="12" tabindex="28" type="text" /><span class="dateFormat">[&nbsp;<a

href="javascript&colon;DatePicker.insertDate('2/3/2011', 't', true);"

>2/3/2011</a>&nbsp;]</span></td>

</table>
</apex:form>
</apex:page>