Time-domain and spectral-domain two-beam interference experiment with a Michelson interferometer and a detecting system consisting of a monochromator of a variable spectral bandpass and a broadband detector is analyzed theoretically and experimentally and the effect of the monochromator is included in the evaluation the visibility functions of both the spatial and spectral interference fringes. The time-domain theoretical analysis of the two-beam interference shows that the width of the visibility function, that is, the visibility of the spatial interference fringes as a function of the delay in the interferometer varies with the bandpass of the monochromator. The spectral-domain theoretical analysis of the two-beam interference gives the visibility function and shows that the visibility of the spectral interference fringes resolved for a given delay in the interferometer by a spectrometer also varies with the bandpass of the spectrometer. The theoretical conclusions are confirmed experimentally in the Michelson interferometer configuration using a TOLD 9140 laser diode operated below the threshold and a detecting system of a variable spectral bandpass consisting of a prism or grating monochromator and a PIN photodetector. It is shown from the time-domain measurements how the width of the visibility function decreases with the increasing width of the entrance slit of the monochromator. Similarly, it is shown what are the visibility functions for the spectral interference fringes resolved by spectrometers and how they vary with the bandpass of the spectrometer.