function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
You can add/bind date field in VF page in same as other input fields , by using <Apex:inputField/> tag.
To show date in readonly format you can use outputtext or outputLabel
Sample code
<apex:inputField value='{!DateField}' />
To format date value in diffrent formats you can use Date.format() functions, with various parameters based on requiremnt
Regards,
bForce
Use outputField if you want the field to be read only and inputField if it can be edited.
<apex:outputField value="{!YourObject.dateField}"/>
If it is custom field then you have to add __c.
outputField shows with the standard format of date based on your locality setting like - dd/mm/yyyy or mm/dd/yyyy. Note that the separator here is /. Now if you want different format, say separator as -, then make use of outputText as following,
<apex:outputText value="{0,date,dd-MM-yyyy}"> <apex:param value="{!YourObject.dateFieldName}"/></apex:outputText>
Is the problem solved? Let me know if you need more clarifications..
You can add/bind date field in VF page in same as other input fields , by using <Apex:inputField/> tag.
To show date in readonly format you can use outputtext or outputLabel
Sample code
To format date value in diffrent formats you can use Date.format() functions, with various parameters based on requiremnt
Regards,
bForce
Use outputField if you want the field to be read only and inputField if it can be edited.
<apex:outputField value="{!YourObject.dateField}"/>
If it is custom field then you have to add __c.
outputField shows with the standard format of date based on your locality setting like - dd/mm/yyyy or mm/dd/yyyy. Note that the separator here is /. Now if you want different format, say separator as -, then make use of outputText as following,
<apex:outputText value="{0,date,dd-MM-yyyy}">
<apex:param value="{!YourObject.dateFieldName}"/>
</apex:outputText>
Is the problem solved? Let me know if you need more clarifications..