@props([ 'value' => '', 'required' => '', 'end_date' => null, 'col_size_class' => null, 'placeholder' => trans('general.select_date'), ]) @php // Belt-and-suspenders: if a caller (or old() after a validation error) // hands us an array/object rather than a scalar, cast it to empty so // htmlspecialchars() doesn't blow up rendering the value attribute. $value = is_scalar($value) ? (string) $value : ''; @endphp