I think they come out shortly after birth.
When we went to pick out our first Yorkie, the litter was 2 days old. Scruffy slept quietly in my mom's hand. When I held him, the little booger growled!
It set the stage for a tumultuous 11.5-year relationship ...
Seriously, they usually do have personality emerging early on. But they can also change. For example, Scruffy was very loving and shadowy during his first year. After that, not so much.
Ozzie, on the other hand, is a lover man. He's my velcro baby and has been since we got him at 11 weeks.