Hi Carlissa, first of all that is pretty normal behavior, both of my kids have had meltdowns similar to what you have described, and my son would act out when we would leave his grandparent's house too.
So this is what I did, I let both of my children know that we would be leaving soon, or going in soon, so that it wasn't a huge surprise that the fun was ending. And I set a time limit, then I reminded them one more time before it was time for us to leave. This seemed to help. I also used a timer so they had a visual reference.
You could take a egg-timer or something like that outside with you so he can see what you are talking about.
You can even let him set the timer so he feels like he is in control of the situtation too, plus tell him you are going to go in and read a book or take a bath, so he can see that even though the fun is stopping out-side, you are still going to do something fun in-side.
Lastly I did tell them that if the behavior did not stop we would not go out-side the next day, or over to grandma's on the weekend. And I stuck to it which was hard, but they got the message. Especially when it was a beautiful day and we weren't outside or when I said we couldn't go to grandma's the next day because of their behavior.
I hope this helps,
Good Luck,
L.