In this study; first, an outline of the evolutionary approach to electromagnetics (EAE) is presented in a compact form, and secondly, electromagnetic oscillations in a cavity excited by a casual time-dependent signal (e.g. a sinusoid) is studied in the time domain within the frame of the EAE. The signal exciting the field is installed in Maxwell's equations via electric current density given as a function of coordinates and time. The signal may be an arbitrary integrable function of time. Modal field expansions with time-dependent modal amplitudes are derived. The modal amplitudes are obtained explicitly as simple convolution integrals where a temporal signal function is present at the integrands.