Moved calculating of remaining days to frontend.
Added check on min number value.