Pterodactyls and other pterosaurs belonged to the dinosaur group and are correctly called dinosaurs.
Pterosaurs (including Pterodactyl) were an entirely separate group of flying reptiles that shared a common ancestor with dinosaurs but were not dinosaurs themselves. Pterosaurs belonged to the clade Pterosauria, distinct from Dinosauria. They had unique skeletal adaptations for flight including a highly modified wing structure with an elongated fourth finger, different hip and leg anatomy, and no direct dinosaurian features. While they were contemporaneous with dinosaurs during the Mesozoic, they represent a parallel evolutionary line of archosaurs.