Javascript -- Date Time picker
<p>I have problem with a javascript date script.</p>

<p>Scripts is that;</p>

<p><img src="http://i.stack.imgur.com/OQ49M.png" alt="enter image description here">
Choose a time and when you selected</p>

<p><img src="http://i.stack.imgur.com/wuA5w.png" alt="enter image description here"></p>

<p>and print the date. However, what 
i want is to show this<br>
like </p>

<p>2012-02-04</p>

<p>i changed from .js from the places </p>

<p>and now it works</p>

<p><img src="http://i.stack.imgur.com/agcGD.png" alt="enter image description here"></p>

<p>i made it from function FormatDate(pDate) from .js file.</p>

<p>but also  i want to add '0' to months and days if they are less than 10</p>

<p>i find this line in .js and make it</p>

<pre><code>if(this.Month &lt; 10)
 return(this.Year+DateSeparator+('0'+this.Month+1)+DateSeparator+pDate);
</code></pre>

<p>however, doesnt works :(</p>

<p>how can i achieve this ? how can i add '0' if months and days are less than 10</p>

<p>you can reach my .js from here
<a href="http://jsfiddle.net/hxzBP/" rel="nofollow">http://jsfiddle.net/hxzBP/</a></p>
