title: Javascript Calendar needs new function
body: <p>First of all, this forum has been outstanding at helping me learn the limited scripting I do understand so thanks to everyone who contributes.</p>
  
  <p>I have been using the following script on my website to generate a dropdown menu of months/years for a form:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script&gt;
  function CreateMonthDropDown(){
       var arrMonthName = new Array();
       arrMonthName =
   ["January","February","March","April","May","June","July","August","September","October","November","December"];
       var ThisDate = new Date();
       var ThisMonth = ThisDate.getMonth();
       var ThisYear = ThisDate.getFullYear();
       var tmpMonthYear;
       var tmpMonthYearName;
  
       document.write(" &lt;option value=\"\"&gt;Any Date&lt;/option&gt;");
  
       for ( i = 0; i &lt; 36; i++) {
             if ( ThisMonth == 12 ) {
                 ThisMonth = ThisMonth - 12;
                 ThisYear = ThisYear + 1;
             }
             if ( (ThisMonth + 1) &lt; 10 ) {
                  tmpMonthYear = '0' + (ThisMonth + 1) + '*' + ThisYear + '*';
             } else {
                 tmpMonthYear = (ThisMonth + 1) + '*' + ThisYear + '*';
             }
             tmpMonthYearName = arrMonthName[ThisMonth] + ' ' + ThisYear;
             document.write(" &lt;option value=\"" + tmpMonthYear + "\"&gt;" + tmpMonthYearName +  "&lt;/option&gt;");
              ThisMonth = ThisMonth + 1;
         }
  }
  &lt;/script&gt;
  &lt;font size="1"&gt;Travel Date:&lt;/font&gt;&lt;br&gt;&lt;select name="srchStartTravDate"&gt;
      &lt;script&gt;CreateMonthDropDown();&lt;/script&gt;&lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is great for generating month/year and removing outdated options. However, an API search I use has recently changed their values. Here's what I need:</p>
  
  <p>I need the display to remain the same to the user - January 2018, February 2018 etc.</p>
  
  <p>But I need the value passed through on the form in the following format:</p>
  
  <p>Month needs to be reflected in a two digit number 01, 02 etc. with a * on the end
  Year needs to be reflected in a four digit number 2018, 2019 etc. with a * at end
  All entries need to be appended with &amp;DateRangeType=4</p>
  
  <p>So for example, May 2018 would pass the value of: 05*2018*&amp;DateRangeType=4</p>
  
  <p>I've searched and searched for a script that will do this and can't find it or figure out how to adapt it to make this work. Is it possible? Any advice would be greatly appreciate. Thanks in advance.</p>