Fixes #2509. Check for invalid dates
This commit is contained in:
@@ -206,11 +206,13 @@ class SchedulePresenter extends BasePresenter implements Arrayable
|
||||
/**
|
||||
* Formats the completed_at time ready to be used by bootstrap-datetimepicker.
|
||||
*
|
||||
* @return string
|
||||
* @return string|void
|
||||
*/
|
||||
public function completed_at_datetimepicker()
|
||||
{
|
||||
return $this->dates->make($this->wrappedObject->completed_at)->format('Y-m-d H:i');
|
||||
if ($this->wrappedObject->completed_at !== '0000-00-00 00:00:00') {
|
||||
return $this->dates->make($this->wrappedObject->completed_at)->format('Y-m-d H:i');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user