@props([ 'placeholder' => 'Pilih Tanggal', 'label', 'description', 'error', 'disabled' => false, ]) @php $isError = isset($error) && strlen($error) > 1; $defaultClass = 'Input-Date w-full bg-gray-100 border rounded px-3 pr-10 py-2 my-1 text-black focus:outline-primary-100 focus:border-transparent focus:bg-white focus:text-black cursor-pointer border-gray-300 ' . ($isError ? 'border-red-400/80 text-red-500/80 focus:ring-red-400' : ' '); @endphp @isset($label) @endisset @isset($description) {{ $description }} @endisset twMerge($defaultClass)->merge([ 'placeholder' => $placeholder, 'type' => 'text', 'data-type' => 'date', 'autocomplete' => 'one-time-code', ]) }} x-on:focus="() => { focus = true if (typeof modalInputPicker !== 'undefined') { modalInputPicker = true } }" x-on:blur="() => { focus = false if (typeof modalInputPicker !== 'undefined') { modalInputPicker = false } }" x-ref="dateInput" x-data="inputDate($refs.dateInput)" /> @if ($isError) {{ $error }} @endif