Fixed up DATEPICKER_FORMAT safety check