$(window).load(function() { $('input').datepicker({ changeYear: true, yearRange: '-40:2' }).addClass('picker'); });