$panel does not exist in this context

date.php was throwing some warnings and producing the wrong attribute value. `$panel` isn't being passed to the field, so it needs to be pulled from the global scope one way or another.