fixing the invalid date bug in invitation page