I assume your daughter is under 18? You cannot get up and take his child to another country. Give custody over to him if you want to move.
I assume everyone is american citizens? Why do you want to move to spain? Dad is entitled to a relationship with his child. You will have to go to court and file a motion to allow the move but I can tell you, it is going to be very difficult for the courts to allow you to do this.