For Vanguard historical dates, you can find them at links like:
Change the mutual fund name at the end of the link for others. There is also https://investor.vanguard.com/mutual.../distributions
which apparently lists them all together.
For future quarterly dates, it seems that Vanguard doesn't publish them ahead of time. Not that I've been able to find, anyway. But most of the time you can look at the past distribution history above to guess within a couple of days.
Closer to the end of the year Vanguard will publish estimated YE distributions, but the link can be hard to find. Usually someone else finds it and publishes it here.
Can't say for Fidelity.
Note that you typically don't want to "buy the dividend", see the bottom of: