Skip to content

Commit

Permalink
Date field default value
Browse files Browse the repository at this point in the history
  • Loading branch information
lahirulhr committed Jun 19, 2024
1 parent 6c961ea commit 73341d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Controllers/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ private function resolvePanel(Panel $panel, $values)
{
return collect($panel->data)
->each(function (Field $field) use ($values) {
$value = $values[$field->attribute] ?? '';
$value = $values[$field->attribute] ?? null;

if ($field->component == 'date-field') {
$value = Date::parse($value);
$value = $value ? Date::parse($value) : null;
}
$field->resolve($this->makeFakeResource($field->attribute, $value));
})
Expand Down

0 comments on commit 73341d9

Please sign in to comment.