moddify panel to prevent date from being pushed off screen