Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

How to remov default date from VF page next to the box is this can be done enter image description here

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You will need some CSS:

div.hideCurrDate span.dateInput span.dateFormat{
   display:none;
}

And HTML wrapper DIV:

<div class="hideCurrDate">
    <apex:inputField value="{!someDateVar}" id="yourDateField" />
</div>

Here is a page example that works for me:

<apex:page controller="myClass">

    <style>
        div.hideCurrDate span.dateInput span.dateFormat{
           display:none;
        }
    </style>

    <apex:form >

        <div class="hideCurrDate">
            <apex:inputField value="{!obj.Birthdate__c}" id="yourDateField" />
        </div>

    </apex:form>

</apex:page>
share|improve this answer
    
HI mastOr i tried the code but its not working –  rakesh Dec 21 '12 at 13:14
    
@rakesh Hi, i posted a new example of the page. That works for me. –  mast0r Dec 21 '12 at 13:19
    
it works thanks MastOr –  rakesh Dec 21 '12 at 13:21
    
Hi mastOr i have another issue im displaying some event fields on vf page but im not displaying the Time field on this page. when i save the record im getting the error msg. System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Time]: [Time] Error is in expression '{!dosave}' in component <apex:page> in page bathing_solutions –  rakesh Dec 21 '12 at 13:26
    
to my requirement i dont need this field on the page how can i sort it out –  rakesh Dec 21 '12 at 13:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.