studioespresso / craft-date-range

Date range field for Craft CMS
MIT License
12 stars 5 forks source link

Add field to element index view #3

Closed janhenckens closed 4 years ago

janhenckens commented 4 years ago
public function getTableAttributeHtml($value, ElementInterface $element): string
{
    return $value->start->format('d/m/Y') . ' - ' . $value->start->format('d/m/Y');
}

Plus check if start & end are the same and show only 1 of them