Formatting date using jquery datepicker
<p>I apologise if this is a really basic question but I am using the following jquery plugin:
<a href="http://jonathanleighton.com/projects/date-input" rel="nofollow">http://jonathanleighton.com/projects/date-input</a></p>

<p>I want to change the date from YYYY-MM-DD to DD/MM/YYYY using his suggestion under customisations. I tried to do the following which I thought would work but it completely breaks it:</p>

<pre><code>$.extend(DateInput.DEFAULT_OPTS, {
  stringToDate: function(string) {
    var matches;
    if (matches = string.match(/^(\d{4,4})-(\d{2,2})-(\d{2,2})$/)) {
      return new Date(matches[1], matches[2] - 1, matches[3]);
    } else {
      return null;
    };
  },

dateToString: function(date) {
    var month = (date.getMonth() + 1).toString();
    var dom = date.getDate().toString();
    if (month.length == 1) month = "0" + month;
    if (dom.length == 1) dom = "0" + dom;
    return date.dom + "/" + month + "/" + getFullYear();
  }
});
</code></pre>

<p>It's the following line where it all goes wrong:</p>

<pre><code>return date.dom + "/" + month + "/" + getFullYear();
</code></pre>

<p>Could anyone offer a suggestion as to what I'm doing wrong?</p>
