Bad news, you're late to the party. In order to have flexibility on choices regarding dates and lodging you should be looking a year in advance. With that said;
YNP has lodging available inside the park, get on their web site and it will provide links to concessionaires that provide lodging. YNP has 5 public entrances, the towns located near them are referred to as Gateway Communities. West entrance = West Yellowstone, MT; Main North entrance = Gardiner, MT; NE Entrance = Cooke City, MT (small); East entrance = Cody, WY and finally South entrance = Jackson Hole, WY.
My number one recommendation would be somewhere around Jackson Hole. You have both YNP and Grand Teton NP. The Flagg Ranch is located along the Roosevelt Parkway between Grand Teton and YNP as an example. I briefly looked at availability and the only dates I found were in August
https://www.gtlc.com/lodges/headwaters-lodge-at-flagg-ranch
There will be many other choices.
Cody, Wyoming where I live is located 50 miles from the east entrance. We're a town of ~ 9k people with over 40 motels that are full in the summer... There are several dude ranches located between Cody and the East Entrance along the North Fork Shoshone River. One of the best times to visit Cody is July 1 - 4, parade on the 3rd and 4th and the Cody Stampede Rodeo (outside of July 4th festivities the Cody Night Rodeo is every night) The Buffalo Bill Center of the West has 5 different museums; the Draper Natural History Museum is great for kids.
Get your tickets to the Cody Rodeo online here! The Cody Rodeo happens each year from June 1st through August 31st and the Cody Night Rodeo happens each night at 8 PM. Visit the Rodeo Capital of the World in Cody, Wyoming!
www.codystampederodeo.com
Discover the rich history of the American West at the Buffalo Bill Center of the West in Cody, WY. Explore our museum and experience the Wild West.
centerofthewest.org
Cody Country Chamber of Commerce | Lodging & Travel
business.codychamber.org