Three dates, but only two of them get a journal entry.
Dr. Retained earnings, Cr. Dividend payable — a liability is born.
No entry. Only fixes who is entitled to be paid.
Dr. Dividend payable, Cr. Cash — the liability and the cash both fall.
The is the only date that changes anything on the books — the board's vote creates a real liability and reduces retained earnings immediately, before a dollar moves.
The just draws a line: whoever holds shares on that date gets paid, with no accounting effect of its own. The settles the liability already recorded — cash and the payable fall together, so total equity does not move again.