You can add a dining plan up to 3 days before arrival. I'd recommend doing it at least a week ahead of time, or there will be a small fee. (Normal change fees are usually waived for upgrading packages, but there's a "last minute" fee for package changes in the last week that doesn't seem to get waived.)
Note that adding a dining plan requires the reservation to be a package, which would require payment in full at the time for all components at the time you add the dining plan (since you're within 45 days), and you must have a ticket purchase component to the package, unless you're staying on an annual passholder package or as a DVC member using points.