Invece di stanziare il datepicker al ready $(function().......}) lo lanci da funzione function datePicher(){..... Codice ......}