4 to 6 months is the recommended age - depends on a couple of things though - how strong is the foal and how low is the mother.
I weaned my tbxwb at 4.5 months - she has always been a well grown sturdy foal - no issues from birth - neither mum or baby could frankly give a damn and foal lost absolutely no condition during the process.
You must make sure the foal is feeding (hard feed, grass and hay) well before you even consider this though.