title: highlighting specific days in jQuery datepicker
body: <p>I have looked through various posts to try and solve my problem such as:
  <a href="https://stackoverflow.com/questions/24162554/how-to-highlight-some-specific-days-with-multiple-colors-in-jquery-datepick">How to highlight some specific days with multiple colors in JQuery Datepick</a></p>
  
  <p>Although none work for my own specific needs. I am passing a number of dates (enableDays) into Datepicker, the dates that I pass in are the only dates available for the user to select. I need to highlight this specific set of dates in green</p>
  
  <p><img src="https://i.ibb.co/MBDZXwY/datep.png" alt="a busy cat"></p>
  
  <p>in the above picture, only the dates 28/30/31 are available for the user to select; I need these 3 dates highlighted in green.</p>
  
  <p>my datepicker code so far:</p>
  
  <pre><code>&lt;script src="~/Scripts/jquery-ui-1.12.1.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
              jQuery(function () {
  
                  var enableDays = ['@Html.Raw(string.Join("','", 
  Model.Select(d =&gt; d.Date.ToString("dd-MM-yyyy"))))'];
  
                  console.log(enableDays);
  
                  function enableAllTheseDays(date) {
                      var sdate = $.datepicker.formatDate('dd-mm-yy', date)
                      console.log(sdate)
                      if ($.inArray(sdate, enableDays) != -1) {
                          return [true];
                      }
                      return [false];
                  }
  
                  $("#txtDate").datepicker({
                      dateFormat: "dd/MM/yy",
                      beforeShowDay: enableAllTheseDays,
  
  
  
                  });
  
              });
   &lt;/script&gt;
  </code></pre>
  
  <p>The enableDays is an array of dates to be shown to the user in the Datepicker. E.g. in this case the array would be ['28-08-2019', '30-08-2019', '31-08-2019'] </p>
  
  <p>can anyone tell me how I can highlight only the 'enableDays' in green?</p>
  
  <p>Cheers</p>