Fix when changing month skips to next month

When going from 31st to other month with less days via dropdown month is
changed to next month, same thing  for February 29th and changing year.