Of course. But the issue is that children ages 0-10 can (and do) go pretty much anywhere in public.
So, a law like this can be used to attempt to keep Pride flags out of hospitals, public transit, businesses, parades, etc. etc. etc.
The solution, of course, is to accept that LGBTQ people are a part of our society and that teaching kids about them is as proper as it is to teach about the existence of women, minorities, immigrants, different religious faiths, and every other kind of person.