I am using the UI DatePicker from jQuery UI as the stand alone picker.
(我正在使用jQuery UI的UI DatePicker作为独立的选择器。)
I have this code: (我有以下代码:)
<div id="datepicker"></div>
And the following JS:
(和下面的JS:)
$('#datepicker').datepicker();
When I try to return the value with this code:
(当我尝试使用以下代码返回值时:)
var date = $('#datepicker').datepicker('getDate');
I am returned this:
(我得到这个:)
Tue Aug 25 2009 00:00:00 GMT+0100 (BST)
Which is totally the wrong format.
(这是完全错误的格式。)
Is there a way I can get it returned in the format DD-MM-YYYY
? (有没有办法让我以DD-MM-YYYY
格式返回它?)
ask by tarnfeld translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…