This paper addresses the adaptive optimal output regulation problem of discrete-time linear systems with input time-delay. The state is reconstructed by retrospective input and measurement output. Based on value iteration and adaptive dynamic programming, an approximate optimal controller is learned by online input and output data. Notably, the exact knowledge of the plant and the exosystem is not needed, and the a priori knowledge of an initial admissible control policy is no longer required. Theoretical analysis and an application to a grid-connected inverter show that the proposed data-driven methodology serves as an effective tool for solving adaptive optimal output regulation problems.