You need to sign in to do that
Don't have an account?
pq100
button to add weeks to inputfield date
Hi
I've got a visualforce page with a number of inputfields showing various dates, alongside them i have commandbuttons and another empty input field. I'd like the user to be able to type in a number of weeks into the empty box, click the button which will then automatically add the number of weeks to the date field.
I'm pretty new to this, any ideas how i should go about it?
Thanks
Paul
You can define a action funtion for the Command Button that performs the desired functionality.
The definition should go as
public PageReference addweeks() {
date_field = date_field.adddays(no_of_weeks*7);
return null;
}
The command must call this function whenever it is clicked.