Date Picker 'Set Default Output' based on another Date Picker

A

aspear

I have a BeginDate 'Date Picker' in which users will select a specific date.

I need the OUTPUT in my EndDate 'Date Picker' to default to one calander
year after the date of the BeginDate selected by the user...

How can i set the EndDate Date Picker to default to 1 year after the date
selected in the other date picker?

thanks for your assistance...

AMY
 
G

Greg Collins

InfoPath 2007 has included new functionality to allow you to add days to a
date, but this will not necessarily give you what you want due to leap years
(though you can probably account for that).

Otherwise, code will probably give you what you need because you can control
your calculations exactly.
 
A

aspear

I have played around with that functionality however it doesn't seem to
giving me an OUTPUT of a date...

How exactly do I add this 'rule' such as:
Rule: BeginDate > is not blank
Action: Set End Date > BeginDate+ (365 days)

I need the action to autopopulate the EndDate field...

Or I need to set the default value of EndDate to populate based on value of
BeginDate 'date picker'...

what is the xpath...
 
A

aspear

Pretty much it can be set to the same mm/dd and simply take yyyy +1...

Is there an easy way to accomplish this using InfoPath and not necessarily
having to write code for it...

Thanks,
 
A

aspear

thanks... I must have been having a blonde moment...
I was entering AddDays(BeginDate, +365)

amazing how that over sight threw me off...

Thanks some much for the input..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top