Citing work with a publication year in the future
Most journals take as formal publication date the date it appears on their printed version. The online version is considered a pre-publication.

Thus, despite how weird it may look, it is ok to cite an article from the future (as long as it is accepted and in press or the online preview). Journals with only online presence would not have this issue or the time span might be smaller.

What is probably important is to provide the DOI of the article (if available) as this will make it easier for people to find its online version before and after it has been published on paper.

Edit: Just to add that the citation and its details is decided/provided by the journal and not by you.