The easiest solution was to change the underlying problem: Make sure not to have elements with the same ID, and so I ended up changing the underlying model so that the problem did not occur.
jQueryUI does the lookup by ID, and as such the result will be put in the first element with the id "FromDate". That is how it works, and as it is 1) bad practice and 2) not in compliance with xhtml-standards (as far as I know) to have multiple elements with the same ID the easiest way is to follow the standards.
And as such, both your suggestions will fall short.
So - the answer is: Keep IDs unique! :)
Thanks for the input to both of you.