Flights to and from the Spanish islands have been disrupted, leaving tourists stranded at airports.