Fix a bug that display wrong numbers when enter a past date