Closed alyamovsky closed 6 years ago
@ddlzz there's not an option for that ... but you could solve it by adding this to the constructor of your entity (as seen on https://stackoverflow.com/a/8714179/2804294):
class YourEntity
{
/**
* @var \DateTime
*/
private $created;
public function __construct()
{
$this-> created = new \DateTime();
}
}
@javiereguiluz thanks!
Hi there!
I'm using Easyadmin with Symfony4. One of my entities has the field 'created_at' which goes like:
and also I have the following config line describing this field in the new entity creation page:
Because sometimes I need to set it manually but most of the time the current date would be appropriate. But unfortunately this field is equal to 01-01-2013 by default so I need to set it manually every time. Is there any way to put current date value to it?