Level 67
@unk Pretty sure this is jQuery datepicker based on what you posted. This probably belongs in the Javascript category.
I think this uses standard PHP datetime so try changing your format to format: 'Y-m-d'
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I tested this feature 2 weeks ago and it worked perfectly. Now it's suddenly broken. Why? https://imgur.com/TlY1r9v I want the date to be displayed like this: YYYY-MM-DD without time. It works 2 weeks ago and now it's broken.. I don't understand why.
code for my datepicker:
<script type="text/javascript">
$(document).ready(function(){
$("#datepicker").datetimepicker({
format:'YYYY-DD-MM'
})
})
</script>
choose date:
<div class="card">
<div class="card-header">
Choose date
</div>
<div class="card-body">
<input type="text" class="form-control datetimepicker-input" id="datepicker" data-toggle="datetimepicker" data-target="#datepicker" name="date">
</div>
</div>
Thank you!
Please or to participate in this conversation.