In line with the Qur'anQur'an 6:54 ↗وَإِذَا جَآءَكَ ٱلَّذِينَ يُؤۡمِنُونَ بِـَٔايَٰتِنَا فَقُلۡ سَلَٰمٌ عَلَيۡكُمۡۖ كَتَبَ رَبُّكُمۡ عَلَىٰ نَفۡسِهِ ٱلرَّحۡمَةَ أَنَّهُۥ مَنۡ عَمِلَ مِنكُمۡ سُوٓءَۢا بِجَهَٰلَةٖ ثُمَّ تَابَ مِنۢ بَعۡدِهِۦ وَأَصۡلَحَ فَأَنَّهُۥ غَفُورٞ رَّحِيمٞ
When those who believe in Our revelations come to you, say, “Peace be upon you, your Lord has prescribed mercy for Himself. Whoever among you does wrong out of ignorance, and then repents afterwards and reforms—He is Forgiving and Merciful.”
The verse tells the messenger to say peace be upon you to believers who come to him, agreeing with his practice of greeting others with peace.
In line with the Qur'anQur'an 4:86 ↗وَإِذَا حُيِّيتُم بِتَحِيَّةٖ فَحَيُّواْ بِأَحۡسَنَ مِنۡهَآ أَوۡ رُدُّوهَآۗ إِنَّ ٱللَّهَ كَانَ عَلَىٰ كُلِّ شَيۡءٍ حَسِيبًا
When you are greeted with a greeting, respond with a better greeting, or return it. God keeps count of everything.
The verse makes greeting and returning greetings a duty; it does not mention children, so it supports only the general practice of greeting.