The stability of natural convection in a vertical layer of viscoelastic fluid confining between rigid-isothermal side walls held at different temperatures is investigated numerically using the Chebyshev collocation method. The viscoelastic behavior is modelled by means of a constitutive equation encompassing the Navier-Stokes-Voigt fluid or the Kelvin-Voigt fluid of order zero. The onset of convective instability is examined by linearizing the governing equations for the perturbations and an appropriate extension of Squire's theorem is given making a case to consider only two-dimensional perturbation stability equations. The numerical solution of the stability eigenvalue problem leads to the determination of the neutral stability condition. The dependence of the Kelvin-Voigt parameter on the critical stability parameters and also on the Prandtl number at which the point of transition from stationary to travelling-wave mode occurs is thoroughly analysed. The Kelvin-Voigt parameter shows an important role on the travelling-wave mode instability where it inducts both stabilizing and destabilizing effects on the base flow depending on the values of Prandtl number, while its impact on the stationary mode is found to be very weak. Furthermore, the streamlines and isotherms of the perturbation modes presented herein demonstrate the development of complex dynamics at the critical state. The results of a Newtonian fluid are obtained as a particular case.