You need to sign in to do that
Don't have an account?
Show start and end date as per week # selected
Hi,
I have a requirement wherein I have to select a week from picklist and using which I have to display start and end date of that week.
I am able to accomplish this using:
<apex:page standardcontroller="dropdown__c" extensions="mytest2">
Please select required week:
<apex:form >
<apex:actionRegion >
<apex:inputField value="{!dropdown__c.week__c}" id="stage">
<apex:actionSupport event="onchange"
status="status" action="{!save}" rerender="dropdown__c"/>
</apex:inputField>
</apex:actionRegion>
</apex:form>
</apex:page>
public class mytest2 {
ApexPages.StandardController GstdController;
public mytest2(ApexPages.StandardController controller) {
GstdController = Controller;
}
public PageReference save() {
// save();//invoke standard Save method
PageReference pr = GstdController.save();
pageReference pv = GstdController.view();
// return pv;
// return Apexpages.currentPage();//refresh current page
// return null;
return pv;
}
}
But now the problem lies is that when I select a week, page gets refreshed and then only the start date and end date is shown.
I want that on the same page where we selected the week, the start and end date should be shown:
Something like:
Select Week- lets say user select week 2 from picklist
Then the output should be
Select Week- (in picklist value-2 is selected)
and there only the output should be shown (below the selected picklist value only):
Start Date
End Date