jQuery UI DatePicker - Change Date Format

Posted by tarnfeld on Stack Overflow See other posts from Stack Overflow or by tarnfeld
Published on 2009-08-25T12:40:38Z Indexed on 2012/10/28 5:02 UTC
Read the original article Hit count: 158

I am using the UI DatePicker from jQuery UI as the stand alone picker.. i have this code

<div id="datepicker"></div>

And the follow 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 return DD-MM-YYYY ??

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui