i am new to learning Jquery . i just used a datepicker widget which i wanted to return data in format 'dd-mm-yy' . So i downaloded the sourcecode of it and just tried using it .Now, the output is coming in format yyyy-mm-dd'. i dont know why
<head>
<meta content="en-in" http-equiv="Content-Language">
<link rel="stylesheet" href="../css/olms.css">
<link rel="stylesheet" href="/admin/plugins/jquery-ui.css">
<script src="/admin/plugins/jquery-1.12.4.js"></script>
<script src="/admin/plugins/jquery-ui.js"></script>
<script>
$(function () {
$('#datepicker').datepicker();
});
</script>
</head>
<label for="fromdate">From Date</label>
<div>
<input id="datepicker" name="fromdate" type="date" autocomplete="off" >
</div>
when i echoed my SQL Query It gives following output
INSERT INTO offrslvedetls(lvetype,todate,fromdate,description,status,isread,empid)
VALUES('OUTPASS','2021-02-06','2021-02-05','s','0','0','IC78733')
the dates are of format 'yyyy-mm-dd'.
i also change the statement $('#datepicker').datepicker();
into $('#datepicker').datepicker({ dateFormat: 'dd-mm-yy' });
but still the same result. pl guide
question from:
https://stackoverflow.com/questions/66050127/jquery-datepicker-format 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…