+ Start a Discussion
mgodseymgodsey 

use calendar widget without current date link

I want to have a date field on a visualforce page that does use a calendar widget, but does not include the current date link adjacent to the input field. I tried adding the showdatePicker="false" attribute, but this gets rid of BOTH the calendar widget and current date link.

<apex:inputField value="{!s.CampaignSTARTDate__c}" style="width:70px" required="true" showdatePicker="false" />

When I then added the type="date" attribute, I got the following error message:
Attribute 'type' on component <apex:inputField> in '/apex/quoteLineItemEntryOption4' requires HTML docType version 5.0 or higher in quoteLineItemEntryOption4 at line 183 column 138

I'm not sure of the implications of changing the docType to version 5.0 and I don't like the way the field looks with that type, so I'd prefer not to do it this way. Does anyone know any other workarounds?

Thanks!
Best Answer chosen by mgodsey
hitesh90hitesh90
Hi,

you have to add following stylesheet in your visualforce page to remove current date link from input field.

CSS Stylesheet:
<style>
        span.dateInput span.dateFormat{
        display:none;
    }
</style>

Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Advanced Administrator & Sales cloud consultant
My Blog:- http://mrjavascript.blogspot.in/

All Answers

hitesh90hitesh90
Hi,

you have to add following stylesheet in your visualforce page to remove current date link from input field.

CSS Stylesheet:
<style>
        span.dateInput span.dateFormat{
        display:none;
    }
</style>

Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator & Advanced Administrator & Sales cloud consultant
My Blog:- http://mrjavascript.blogspot.in/
This was selected as the best answer
mgodseymgodsey
Thank you so much! Your answer and this post got everything working. Really appreciate it :)

http://developer.force.com/cookbook/recipe/hide-the-current-date-link-on-an-inputfield