´It was narrated from Wathilah bin Asqa' that:` The Prophet said: "Keep your infants, your insane and your evil ones away from your mosques. Avoid engaging in transactions and disputes, raising your voices, carrying out your prescribed punishments and unsheathing your swords therein. Make places for purification at their gates, and perfume them with incense on Fridays." (Maudu')
Brief Explanation
1؎: Bringing children to the mosque is disliked (makruh) when they cry or scream, or there is a fear that they may urinate or defecate; otherwise, from other authentic ahadith, it is established that children did come to the mosque.