fixed a bug where clicking on li elements without dates at the beggining and in the end would populate the input with NaN-0NaN-0NaN (like batman)