So, I'm using a standard HTML5 datepicker like so:
<div class="form-group">
<x-input data-provide="datepicker" id="event_date" type="date" name="event_date" value="<?php echo date('Y-m-d'); ?>" />
</div>
I want the date to be displayed in a DD-MM-YYYY format, but saved into the database as YYYY-MM-DD. Somehow, whatever I put in the echo date() - it doesn't matter - here is Y-m-d, but when I render the form, I will get 12/27/2022 (and I want it to be 27-12-2022).
It saves it correctly in the database, but I don't have any more ideas on how to solve this. As much as I could google it out, it seems that standard HTML5 datepicker just can't be customized in that way - or it depends on the setup of local computer?
Is there an easy way, or a Laravel library or something I could use?