Hi.
I'm working in laravel and I want to show in my Bootstrap Datepicker field a date in a format (dd/mm/yyyy) but I want to store it in format (yyyy/mm/dd).
are there some property in Datepicker to do that? this is my input:
<div class="form-group">
<label for="fecha_nac"></label>
<input type="text" class="form-control CalendarioDP"
name="fecha_nac" placeholder="Colocar fecha"
value="{{ Carbon\Carbon::now()->formatLocalized('%d/%m/%Y') }}">
</div>
My Script:
<script>
$('.CalendarioDP').datepicker({
format: "dd/mm/yyyy",
language: "es",
});
</script>
When I let the format in script like this way, the date is showed it and stored it in a format (dd/mm/yyyy), but I want to stored it in (yyyy/mm/dd).
I have used "Torzer DateTime Mutator" and "protected $dates" but I want to know if there are exist a simple DaterPicker property to declaret just once in the script and not to specify each field that I want to Convert like in Torzer.