change date format of jQuery textbox
<p>I want to change the date format of my <code>input</code> box.</p>

<p>My current date format is <code>yyyy-MM-dd</code>. I want to change the format to <code>dd-MM-yyyy</code></p>

<p>I tried like this</p>

<pre><code>&lt;input id="date" type="text" data-beatpicker="true" data-beatpicker-module="clear" dateformat="dd-MM-yyyy"/&gt;
</code></pre>

<p>and this</p>

<pre><code>&lt;script&gt;
    $(document.ready){
        $('#date').beatpicker{
        format:'dd-MM-yyyy';
        }
    }
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;input id="date" type="text" data-beatpicker="true" data-beatpicker-module="clear"/&gt;
</code></pre>

<p>but I am unable to find a way to solve this.</p>