flatpickr for metronic 8 not showing year
<a>
I dont know why the year is not showing. please help. Here's my code
<script>
$("#date").flatpickr({
altInput: true,
altFormat: "j F Y",
});
</script> Replies (2)
Hi Sarah,
One possible reason could be that the "dateFormat" option is not set to include the year.
Try modifying your code as follows:
<script>
$("#date").flatpickr({
altInput: true,
altFormat: "j F Y",
dateFormat: "Y-m-d",
});
</script> In this example, the dateFormat option is set to "Y-m-d", which includes the year.
Thanks
Hi Sarah,
Could you please check the console log if there is any error?
Thanks