Datepicker won't display

Datepicker won't display

I'm having problems getting the datepicker to display inside a display:none or a visibility:hidden div (After it's changed to be visible). I change these to be visible using asp.net in an update panel, however the datepicker won't work. If I leave it outside of the display:none then it works fine. Any ideas how to fix this?