title: Fill textbox with database date using JavaScript
body: <p>I have dates and amount data. I want to fill this data to the right text input. As you see in the jsFiddle some months have data, and some months don't have data.</p>
  
  <p>In my example below I generate the inputs manually, but I need need to create them with a <code>for</code>-loop, because I must generate textboxes first date month to today month.</p>
  
  <p>What is the easy way for doing this?</p>
  
  <p>jsFiddle:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// Date format dd MM yyyy
  var salaryData = [['date':'1.1.2015','amount':'100'],['date':'5.3.2015','amount':'105'],['date':'8.4.2015','amount':'1900'],['date':'15.6.2015','amount':'1005']]</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
      &lt;h1&gt;Salary days&lt;/h1&gt;
      &lt;ul&gt;
          &lt;li&gt; Amount / Date  &lt;/li&gt;
          &lt;li&gt;
              January 2015 &lt;input type="text" name="janPrice" /&gt;&lt;input type="text" name="date" /&gt;
          &lt;/li&gt;
          &lt;li&gt;
              February 2015 &lt;input type="text" name="janPrice" /&gt;&lt;input type="text" name="date" /&gt;
          &lt;/li&gt;
             &lt;li&gt;
              March 2015 &lt;input type="text" name="janPrice" /&gt;&lt;input type="text" name="date" /&gt;
          &lt;/li&gt;
             &lt;li&gt;
              April 2015 &lt;input type="text" name="janPrice" /&gt;&lt;input type="text" name="date" /&gt;
          &lt;/li&gt;
            &lt;li&gt;
              Haziran 2015 &lt;input type="text" name="janPrice" /&gt;&lt;input type="text" name="date" /&gt;
          &lt;/li&gt;
              &lt;li&gt;
              June 2015 &lt;input type="text" name="janPrice" /&gt;&lt;input type="text" name="date" /&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="http://jsfiddle.net/unqq5vsk/" rel="nofollow">jsFiddle link</a></p>