protected function attachSupportBehaviors(Component $owner)
{
$rangeAttributes = [];
foreach ($this->attributes as $attribute => $dbAttribute) {
$rangeAttributes[] = $attribute . '_start';
$rangeAttributes[] = $attribute . '_end';
$owner->attachBehavior(0, ['class' => DateTimeRangeBehavior::class, 'startAttribute' => $attribute . '_start_local', 'endAttribute' => $attribute . '_end_local', 'targetAttribute' => $attribute . '_range']);
}
$owner->attachBehavior(0, ['class' => DateTimeBehavior::class, 'originalFormat' => ['date', 'yyyy-MM-dd'], 'targetFormat' => ['date', 'dd.MM.yyyy'], 'attributes' => $rangeAttributes]);
}