A Florida father is being commended on social media after buying groceries for his ex.

Brandon Carpenter’s daughter was not feeling well and he was asked by her mother to bring over some infant Tylenol Sunday.

There was plenty of food, snacks and formula for his daughter in the pantry; however, the fridge was empty aside from some water.

>> Read more trending news

"I went shopping to make sure she had food for the next few weeks. Just because we aren't together doesn't mean I can't provide for her if she needs it," Carpenter wrote in the post on Facebook. "If my child's mother is good then I know she is taking care of our daughter the best she can."

Carpenter said his ex works full time, pays rent and other bills, including for a car.

Many of the 23,000 comments were from women appreciative of Carpenter’s approach to parenting.

He ended the post with a message to others:

"It's time to grow up and take responsibility in all aspects of life," he wrote.