Skip to content

Commit

Permalink
2.64.1 New donation form now prefills today's date by default
Browse files Browse the repository at this point in the history
  • Loading branch information
classaxe committed Mar 14, 2024
1 parent fa0435b commit ef6e8d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/Web/Donations/Donation.php
Expand Up @@ -78,7 +78,7 @@ public function donation(
foreach (static::EDITABLE_FIELDS as $f) {
$args[$f] = $donation->{'get' . ucfirst($f)}();
}
$args['date'] = $donation->getDate() ? $donation->getDate()->format('Y-m-d') : '';
$args['date'] = $donation->getDate() ? $donation->getDate()->format('Y-m-d') : (new DateTime())->format('Y-m-d');
$form = $donationForm->buildForm(
$this->createFormBuilder(),
$args
Expand Down

0 comments on commit ef6e8d9

Please sign in to comment.