I am just about to leave my high deductible plan for a plan that is not HSA-eligible. As I understand it, I could max out my HSA for the year right now, and then I could use the money in my HSA for medical expenses, even though I will no longer have an HSA-eligible insurance plan. Is that correct?

Theoretically, could someone change their insurance to an HSA-eligible plan for one month per year, contribute the max to your HSA, and then switch back to your regular plan. Is that right, or am I missing something?