A beanie right after applying minoxidil is not ideal, but it will not ruin the treatment. Minoxidil absorbs into the scalp over a few hours, and most of the benefit comes from the first 30 to 60 minutes after application, so the best approach is to let it dry completely before covering your hair. If you cover it while it is still wet, the hat can absorb some of the solution, so you lose a bit of the dose, and the extra heat and moisture can increase scalp irritation, itching or flaking. A practical routine is to apply it to a dry scalp, let it dry for 20 to 30 minutes, and then put on a hat if you need to. Wash the hat regularly, since residue can build up. Avoid wearing a tight hat for many hours, since constant pressure and friction can irritate the scalp. If you use foam, it dries faster than liquid, which makes it more convenient with a hat.