It’s the same as English here, if it would have been i he would have written the date in the letter, i.e. included it in the text he wrote. If he writes the date på the letter, than it’s on the outside of it, where you write the address.
Don't rely on the hover translations too much... 'on' can translate as 'om' in some constructions where it could be substituted with "about", but not in this one (e.g. 'a book on history' - 'en bok om historia')