No. Unlike IRAs, where contributions can be made for the previous year up to April 15 of the current year, 401(k) plan contributions – like salary deferral contributions in general – usually apply to the year in which they are actually withheld from the plan participant's paycheck.
For instance, assume that an employee makes an election to defer part of the bonus he will receive for the year 2018. The bonus is based on his 2018 compensation, but is paid on January 31, 2019. The amount deferred from the bonus will apply to his 2019 salary deferral contributions.
This question was answered by Denise Appleby