Datepicker for hidden fields

Datepicker for hidden fields


I have a field that is initially hidden and later becomes visible
throw a .dialog() call. I can't get the field to be have a datepicker
attached to it because of this. I tried making the datepicker() call
in .dialog()'s "open" handler but that didn't work.
If I make the div which contains the field visible when the page is
initially loaded, everything works fine. However, I'd like the div to
have a style of "display:none".
Any ideas?