-2
*I’ve looked at other topics, and I couldn’t figure it out. I have a form like text which receives dates, the user writes in the format dd/mm/yyyy, but when I debug the value returns in yyyy/mm/dd. I need to receive the value in the format dd/mm/yyyy, I tried several codes from here but I couldn’t.
<div class="form-group">
<label for="example-date-input" class="form-control-label">Nascimento do PET (dd/mm/aaaa)</label>
<input type="date" class="form-control" name="dataaniversario" id="example-date-input" maxlength="10" required>
</div>
You have to handle it in PHP when receiving or in Javascript before sending.
<input type="date">
displays the date according to the OS location, but stores the data in ISO format. Something else<input type="date">
is not compatible with all browsers.– Augusto Vasques