<input type="text" placeholder="Start date" class="px-2 py-1 text-sm rounded text-gray-800" x-init="new Pikaday({ field: $el })" x-on:change="$wire.startDate = formatDateToYYYYMMDD(new Date($el.value))" />
<input type="text" placeholder="Start date" class="px-2 py-1 text-sm rounded text-gray-800" x-init="new Pikaday({ field: $el })" x-on:change="$wire.startDate = formatDateToYYYYMMDD(new Date($el.value))" />