set condition dates to not break the edge of their div