Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
281 views
in Technique[技术] by (71.8m points)

Jquery datepicker format

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...