title: How to dynamically populate markedDates object in React Native Calendars?
body: <p>Based on the React-Native-Calendars documentation, here's the test codes with hard-coded markedDates that show the dot(s) on the calendar:</p>
  
  <pre><code>const FirstDot = { key: 'First', color: 'blue' };
  const SecondDot = { key: 'Second', color: 'blue' };
  
  &lt;Calendar
     current={new Date()}
     markingType={'multi-dot'}
     markedDates={{
        '2019-04-15': { dots: [FirstDot, SecondDot] },
        '2019-04-14': { dots: [FirstDot] },
     }}
  /&gt;
  </code></pre>
  
  <p>Basically I want to show one or two dots depending on the data.  Let's say I am retrieving the data from SQLite, how can I populate the markedDates dynamically in React Native?</p>
  
  <pre><code>this.state = { markedDates: {} };  //how to declare the state object?
  //other codes.....
  
  db.transaction((tx) =&gt; { 
      let objMarkedDates = this.state.markedDates;
      tx.executeSql('SELECT myDates, dataDots FROM myTable', 
      [], (tx, results) =&gt; {
          const len = results.rows.length;
          if (len &gt; 0) {
              for (let i = 0; i &lt; len; ++i) {
                  if (results.rows.item(i).dataDots === 2) { //show 2 dots
                      //How to populate the date and the dots to the object???
                  }
              }
          }
      }); 
  
      this.setState({ markedDates: objMarkedDates });
  });
  
  &lt;Calendar
     current={new Date()}
     markingType={'multi-dot'}
     markedDates={this.state.markedDates}
  /&gt;
  </code></pre>