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
Charlie CoxCharlie Cox 

Replace Default Date

<apex:inputField styleClass="standardizer" value="{!application.ArrivalDate__c}"/>
User-added image
On my visualforce page I have an inputField asking for a date. ArricalDate__c is a Date Field. I was wondering if there was a way to disable salesforces' default date selector circled in red. Is there a way to replace the thing circled in red with a calendar widget? 

Thanks!

Thanks
Best Answer chosen by Charlie Cox
Charlie CoxCharlie Cox
Looks like all you need to do is:

<apex:input styleClass="standardizer" type="date" value="{!arrivalDate}"/>

Then have a Date Object in the controller like:

public Date arrivalDate {get;set;}

All Answers

Charlie CoxCharlie Cox
Looks like all you need to do is:

<apex:input styleClass="standardizer" type="date" value="{!arrivalDate}"/>

Then have a Date Object in the controller like:

public Date arrivalDate {get;set;}
This was selected as the best answer
James LoghryJames Loghry
There's no way to replace the default date easily.  You'll either have to remove it by using apex:inputText rather than apex:inputField, or you'll have to use your own custom date picker.  Here's an example of how you would use a custom date picker: http://bobbuzzard.blogspot.com/2012/03/custom-date-picker.html
ndrannapareddyndrannapareddy
Add an input field on the page level which is mapped to a {get; set; } and is always pointed to the actual field in the Object
VF page
<apex:input type="date" value="{!arrivalDate}"/>

public Date arrivalDate {get;set;}

when storing the record map the value to the Object field:

application.ArrivalDate__c = arrivalDate ;