They're simply not from the same species group. Dinosaur is a clade which is divided in 2 orders: the Saurischia and Ornithischia.
Part of the Saurischia are all carnivorous dinosaurs (and certain types of theropods), as are all of the birds and one of the two primary lineages of herbivorous dinosaurs, the sauropodomorphs. At the end of the Cretaceous Period, all saurischians except the birds became extinct in the course of the Cretaceous–Paleogene extinction event. Birds, as direct descendants of one group of theropod dinosaurs, are a sub-clade of saurischian dinosaurs in phylogenetic classification.
Saurischian dinosaurs are traditionally distinguished from ornithischian dinosaurs by their three-pronged pelvic structure, with the pubis pointed forward. The ornithischians' pelvis is arranged with the pubis rotated backward, parallel with the ischium, often also with a forward-pointing process, giving a four-pronged structure. The saurischian hip structure led Seeley to name them "lizard-hipped" dinosaurs, because they retained the ancestral hip anatomy also found in modern lizards and other reptiles. He named ornithischians "bird-hipped" dinosaurs because their hip arrangement was superficially similar to that of birds, though he did not propose any specific relationship between ornithischians and birds. However, as later study revealed, this "bird-hipped" arrangement actually evolved several times independently in dinosaurs, first in the ornithischians, then in the lineage of saurischians including birds (Avialae), and lastly in the therizinosaurians. In this example of convergent evolution, avialans, therizinosaurians, and ornithischian dinosaurs all developed a similar hip anatomy independently of each other, possibly as an adaptation to their herbivorous or omnivorous diets.
Ornithischians shifted from bipedal to quadrupedal posture at least three times in their evolutionary history and have been shown to have been capable of adopting both postures early in their evolutionary history.
Which brings us to the pterodactyls (or pterodons). They are part of the Pterosaur order, which is part of 2 clades : the Pterosauromorpha and the Ornithodira (also called Avemetatarsalia).
There's an awesome chart for Avemetatarsalia on wiki (https://en.wikipedia.org/wiki/Avemetatarsalia) that clearly shows how the tree is distributed. Looking at that diagram, a major split is apparent at the base of this group. On the one side are the dinosaurs and their closest relatives, and on the other are pterosaurs and animals more closely related to them than dinosaurs. Both pterosaurs and dinosaurs are distinct groups that shared a common ancestor, and so to call a pterosaur a dinosaur is to ignore this major divergence in the evolution of both groups. A pterosaur is no more a dinosaur than a goldfish is a shark.
It's a clade name established by in 1999 for all crown group archosaurs that are closer to birds than to crocodiles.
Members of this group include the Dinosauromorpha, Pterosauromorpha, and the genus Scleromochlus. Dinosauromorpha contains more basal forms, including Lagerpeton and Marasuchus, as well as more derived forms, including dinosaurs; birds, according to most modern scientists, belong to the latter as members of the theropods. Pterosauromorpha contains Pterosauria, which as far as is known were the first vertebrates capable of true flight.
Dinosaurs are pterodons are both part of that Avemetatarsalia clade, and it's their lowest common denominator. They are also both part of the same Phylum: the Chordata.
Which brings us to the from Pterosauromorpha. Basically, it only contains pterodactyls and it's close cousings.
Pterodons existed from the late Triassic to the end of the Cretaceous Period (228 to 66 million years ago). Pterosaurs are the earliest vertebrates known to have evolved powered flight. Their wings were formed by a membrane of skin, muscle, and other tissues stretching from the ankles to a dramatically lengthened fourth finger. Early species had long, fully toothed jaws and long tails, while later forms had a highly reduced tail, and some lacked teeth. Many sported furry coats made up of hair-like filaments known as pycnofibers, which covered their bodies and parts of their wings. Pterosaurs spanned a wide range of adult sizes, from the very small Nemicolopterus to the largest known flying creatures of all time, including Quetzalcoatlus and Hatzegopteryx.
Pterosaurs are often referred to in the popular media and by the general public as flying dinosaurs, but this is incorrect. The term "dinosaur" is restricted to just those reptiles descended from the last common ancestor of the groups Saurischia and Ornithischia (clade Dinosauria, which includes birds), and current scientific consensus is that this group excludes the pterosaurs, as well as the various groups of extinct marine reptiles, such as ichthyosaurs, plesiosaurs, and mosasaurs. Like the dinosaurs, and unlike these other reptiles, pterosaurs are more closely related to birds than to crocodiles or any other living reptile. Pterosaurs are also colloquially referred to as pterodactyls, particularly by journalists. Technically, "Pterodactyl" refers only to members of the genus Pterodactylus, and more broadly to members of the suborder Pterodactyloidea of the pterosaurs.
All that is fine and true, but it doesn't highlight the difference very well. So let's compare them face to face. Pterosaurs are sometimes described in the media as ‘flying dinosaurs’. In fact pterosaurs are not part of the group formally termed Dinosauria, although the presence of various morphological characters which are shared by both groups suggest that they are close relatives. The shared presence of a relatively long neck with proportionally long cervical vertebrae, of an elongate tibia, and of a hinge-like ankle joint and elongate metatarsals in the foot indicate that pterosaurs, dinosaurs and a few other groups should be united in a clade which has been termed Ornithodira. It is inferred from this distribution of features that pterosaurs and dinosaurs shared an ancestor that was alive during the middle Triassic.
However, it has been argued on several occasions that pterosaurs are not close to dinosaurs, but instead are part of an altogether different reptile group called the Protorosauria (the only well known member of this group is the bizarre long-necked marine form Tanystropheus). Whether pterosaurs are closer to dinosaurs or protorosaurs remains the source of argument, but at the moment the evidence for an affinity with dinosaurs seems better supported. It’s perhaps worth noting that one palaeontologist (Robert Bakker) argued on one occasion (in his 1986 book Dinosaur Heresies) that pterosaurs are, in fact, part of Dinosauria. However, this is because he used a more inclusive version of Dinosauria than that currently favoured by other palaeontologists: his concept of Dinosauria was essentially synonymous with Ornithodira.
It's also interesting to note modern birds didn't descend from pterosaurs; their ancestors were small, feathered, terrestrial dinosaurs.
Furthermore, what many people don't realize is that you can't just call any old prehistoric reptile a dinosaur. Dinosaurs were a distinct group, the same way snakes or crocodiles are distinct groups today. Dinosaurs were a land-living group - they did not fly or live in water - defined mainly by the structure of their hips, which allowed them to walk with their legs directly beneath their bodies, like ours, rather than sprawling out to the sides as in lizards and crocodiles. For example, you can tell that Dimetrodon was NOT a dinosaur because its legs stick out on either side of its body:
This animal was actually a mammal-like reptile that lived millions of years before dinosaurs evolved, but many people still mistake it for a dinosaur simply because it is an ancient reptile.
One look at pterosaurs, the flying reptiles that lived at the same time as the dinosaurs, or the marine reptiles that lived in the seas at the same time, will show you that they cannot have been dinosaurs because their limbs are not directly beneath their bodies. It is as wrong to call a pterosaur or a plesiosaur a dinosaur as it is to call a turtle a crocodile.
Neither birds nor bats, pterosaurs were reptiles, close cousins of dinosaurs who evolved on a separate branch of the reptile family tree. They were also the first animals after insects to evolve powered flight—not just leaping or gliding, but flapping their wings to generate lift and travel through the air. They evolved into dozens of species. Some were like 5 meters wide, and others closer to modern birds.
A lot of the confusion is that until the 1970s paleontologists believed, in their heart of hearts, that there weren't any true dinosaurs. "Dinosaur" was an informal term used to describe two distinct groups of animals, the Saurischia and the Ornithischia. The two groups were related, but they were equally related to the crocodiles and the pterosaurs (flying reptiles), all of whom were thought to have descended from a common ancestor. There was no real justification for saying tyrannosaurus (a saurischian) and stegosaurus (an ornithischian) were dinosaurs but a pterodactyl wasn't. Nonetheless the term dinosaur had been around for a long time and the public had gotten used to it. So a definition of sorts evolved: dinosaurs were (a) land bound but (b) nonflying (c) reptiles who (d) lived between 230 and 65 million years ago and (e) had upright legs like mammals rather than splayed-out legs like lizards. But the definition was arbitrary, and scientists knew it. So they didn't go out of their way to explain it to anybody else.
About a dozen wiki pages and many random websites. There is quite a bit of copy paste in there, but it's been organized are reworked to properly and thoroughly answer your question.