Hi,
Hello,

I have a form with the following fields : start date, duration (in days) &
end date. I want the user to be able to enter EITHER a duration OR an end
date and the other field will be automatically calculated according to this
and the start date. Each field has an associated feedback label. However,
simple as this seems, I’m having trouble pulling it off. Here’s what I’m
going for in terms of behaviour:

+ If the start date is missing, the others are blanked and disabled.

+ Changing either field results in an ajax update of both and the other
field is calculated.

+ When the form is submitted, the “calculated” field must be null (even
though it displays the calculated value). The underlying domain object
should have either a duration or an end date but not both.
Just curious... why does your domain object need to have both end date and duration (either of which can be derived from the other assuming the start date is set) ? IMHO this makes things more complicated/error prone than necessary (since you have to make sure duration & end date fields stay in sync while deriving one from the other would take care of this automagically).

Cheers,
Tobias



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to