improved animation. When reached maxDate, animation stops automatically