I want to show input date in YYYY-MM-DD format. I don't want to use moment.js like shown in the link enter link description here
When I select date I want date to be shown as "YYYY-MM-DD" format. Here is what I tried
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
<body >
<input type="date" id="bday" required pattern="\d{4}-\d{2}-\d{2}">
<input type="date" id="bday" date-format="YYYY-MM-DD">
</body>
I am running this using electron framework which has chromium built-in. I still wonder if there is a way to change format of date after selecting date.