You need to sign in to do that
Don't have an account?
Jeremy Deseez
Picklist Date doesn't work
Hello SFDC Dev,
I have a pageblock table that's show Quotas of Sales.
I have a picklist (this picklist works) of user role, and the rerender work for the table.
But when I put a picklist of Date, nothing happens for the table and the value of the picklist is not send to the controller.
Some code :
I have a pageblock table that's show Quotas of Sales.
I have a picklist (this picklist works) of user role, and the rerender work for the table.
But when I put a picklist of Date, nothing happens for the table and the value of the picklist is not send to the controller.
Some code :
<apex:outputlabel value="User Role"/> <apex:selectList value="{!idofuserrole}" size="1"> <apex:actionSupport event="onchange" action="{!searchQuotas}" reRender="allquotas"/> <apex:selectOptions value="{!userrole}" /> </apex:selectList> <apex:outputlabel value="Quarter"/> <apex:selectList value="{!namequarter}" size="1"> <apex:actionSupport event="onchange" action="{!searchQuotas}" reRender="allquotas"/> <apex:selectOptions value="{!QuarterList}" /> </apex:selectList> <apex:pageBlockTable value="{!allthequotas}" id="table" var="key" title="{!namequarter}"> <apex:facet name="header"> <input type="checkbox" id="checkAllBox" onchange="toggleCheckAll(this)"/> Select Quarter </apex:facet> <apex:column> <input type="checkbox" data-inputid="val1"/> </apex:column> <apex:column headerValue="Name"> <apex:outputField value="{!key.QuotaOwnerId}"/> </apex:column> <apex:column headerValue="Quota"> <apex:inputField value="{!key.QuotaAmount}" required="false" id="val1"/> </apex:column> <apex:column headerValue="Quota"> <apex:inputField value="{!key.StartDate}" required="false"/> </apex:column> </apex:pageBlockTable> public Date namequarter{get{ if(namequarter == null){ namequarter = Date.today(); }return namequarter; } set; } public List<SelectOption> getQuarterList(){ List<SelectOption> optionsquarter = new List<SelectOption>(); List<SObject> resultsquarter = [SELECT FullyQualifiedLabel,EndDate,StartDate,Type FROM Period WHERE Type = 'Quarter' AND StartDate >= TODAY]; for(SObject rq : resultsquarter){ optionsquarter.add(new SelectOption(String.valueOf(rq.get('StartDate')),String.valueOf(rq.get('StartDate')))); } return optionsquarter; }Thanks for your responses.
replace this,
By
And use Date.valueof(namequarter), in query of the page block table.
Let me know this works or not.