You need to sign in to do that
Don't have an account?
Problem with Date Input Fields when they are hidden and then rendered by an event (BUG ???)
When I put a date input field in a pageblock section that is rendered only when certain criteria are met, once the page is rerendered (by the event) and the field appears, the calendar stops showing up when you click on the field. Alternatively, if i put the field in a pageblock section that is always rendered, it shows up fine. Am I doing something wrong? Or missing something? Here is my code:
Just to further explain the code: The idea here is that when "existing employee" is choosen in the type of applicant field, a new section appears underneath with a lookup to the account object and the existing badge expiration date field.
<apex:page standardController="case" sidebar="false"> <apex:sectionHeader title="Sponsor: {!$User.FirstName} {!$User.LastName}" subtitle="New Badge Request" /> <apex:form > <apex:pageBlock title="Edit Case" id="thePageBlock" mode="edit"> <apex:pageMessages /> <apex:pageBlockButtons location="bottom"> <apex:commandButton value="Submit" action="{!save}"/> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:pageBlockButtons> <apex:actionRegion > <apex:pageBlockSection title="Applicant Information" columns="1" collapsible="false"> <apex:pageBlockSectionItem > <apex:outputLabel value="Type of Applicant"/> <apex:outputPanel > <apex:inputField value="{!case.Type_of_Applicant__c}" required="true"> <apex:actionSupport event="onchange" rerender="thePageBlock" status="status"/> </apex:inputField> <apex:actionStatus startText="Updating required fields..." id="status"/> </apex:outputPanel> </apex:pageBlockSectionItem> </apex:pageblocksection> </apex:actionRegion> <apex:pageBlockSection rendered="{!case.Type_of_Applicant__c == 'Existing Employee'}" columns="1"> <apex:pageBlockSectionItem > <apex:outputLabel value="Please lookup the name of the Employee:" rendered="{!case.Type_of_Applicant__c == 'Existing Employee'}" for="AccountName" /> <apex:outputpanel > <apex:inputField value="{!case.AccountID}" id="AccountName"/> </apex:outputpanel> </apex:pageBlockSectionItem> <apex:inputField value="{!case.ID_Badge_Expiration_Date__c}"/> </apex:pageblocksection > </apex:pageblock> </apex:form> </apex:page>
<apex:outputPanel style="visibility:hidden"> <apex:inputField value="{!object.date}"/> </apex:outputPanel>
All Answers
If you search around on the forums I think you'll find answers to a lot of your questions.
Here's the answer to this one
<apex:outputPanel style="visibility:hidden"> <apex:inputField value="{!object.date}"/> </apex:outputPanel>