Yes, with enough battery and a large enough inverter. There are vids of people doing it, but you need massive panel and battery to make it run for more than a few minutes.
From the testing I did yesterday with a 1000w inverter and 300Ah LiFePO4 battery, and measurements taken from a window A/C in the garage, this is def possible, well within the limits of the inverter and battery.
I ran a 750W load (heater) for 2.5 hours and depleted the battery by 50%. Using very rough numbers and roundoffs, and ignoring the 20-80% LiFePO4 SOC rule, the heater could have run for 5 hours. My A/C in the garage maxed out at 460W, so in theory it would run 1.6 times longer than the heater, or 8 hours with no recharge.
So, yes, you could run a window A/C all day and if supplemented with solar panels, have enough for overnight.
And yes.... I'm going to try it when it's warm enough to run the A/C.
Came across this unit, appears to have been out for a year or so. A hybrid mini-split that has both A/C inputs AND direct connection to solar panels via MC-4 connectors. As long as there is enough sun, no line power needed. Comes in a few different BTU ratings, DIY install, pre-charged with coolant, so no need for gauges and HVAC know-how. Pricey, especially after buying solar panels.
Signature Solar provides solar panels, off-grid solar systems, grid-tie, and hybrid systems. Quality solar inverters, bifacial solar panels, complete solar kits, solar batteries. Featuring brands such as EG4 Electronics with their solar battery, LifePower4 and EG4 LLifePower4 and EG4 LL