Jquery UI Dialog + Datetimepicker

Jquery UI Dialog + Datetimepicker

I'm using Datetimepicker inside the jquery-ui dialog, however it doesn't work, giving me this error:
  1. f is null
When I use datetimepicker in other pages (without dialog) it works just fine....inside the dialog is a problem...
My code:
  1. $(document).ready(function(){

        // Datepicker
          $('.datepicker').datepicker({
                changeMonth: true,
                changeYear: true,
                showOn: 'button',
          inline: true,
            buttonImage: '/images/calendar.png',
                buttonImageOnly: true
            }, $.datepicker.regional['pt-BR']);

            $('.datepicker').each(function() {
              if(this.value == "01/01/-4712")
              this.value = "";
            });

          $('#novo_movimento').dialog({
          modal: true,
          resizable: false,
          autoOpen: false,
          show: 'drop',
          hide: 'drop',
          title: 'Novo movimento',
          width: 500,
          height: 350,
          closeOnEscape: true,
          buttons: {
            "Cancelar": function(){
              $(this).dialog("close");
            },
            "Salvar": function(){
              $("#new_movimento").submit();
            }
          }
        });
      });