I love the assumption that people make that both parties going through a divorce are sane, normal people concerned for their children. That's not always the case. As OP is the sole owner, that makes him responsible for the mortgage payment. There may not be additional funds for him to leave for 3 weeks and stay elsewhere. (BTW - that was my situation). Mom certainly has made it clear that she does not intend to leave.
As the courts will not take it lightly if he rents a hotel room and takes his child with him, it also means that even if it is affordable for him, he can't have his child with him for that timeframe. Also, state guidelines would need to be reviewed for how long a party may leave the marital home before the remaining spouse may legally change the locks.
Reality is that it's an uncomfortable situation for all. That the parents would choose to visit and stay in that household at this time says quite a bit about them. Realistically, wouldn't you think they'd rent a room, have daughter and granddaughter come stay with them as a mini-vacation a night or two, let granddaughter enjoy the pool and eat out? Everyone would get a much needed break and with court in a mere 2 days, their daughter could breathe and not have to try to dress and emotionally prepare for court in the same house as hubby on the day of court. It's what I would be doing for my daughter. But they're not doing that. They are adding to the stress for all by insisting on staying in that home - it speaks volumes.