Passing an Array of Dates to Datepicker - Issue with Date Format

Passing an Array of Dates to Datepicker - Issue with Date Format

Hello Everyone,

Im using datepicker to highlight a few dates that are pulled from my Database
Ive Followed Instructions by Jake From the thread below & got almost everything working(Thanks Jake)

However im facing issue with date's Format
Ive Noticed Dates work When i pass them as :
var datesArray=['2016-7-1','2016-7-2']

However the same date when Passed as:
var datesArray=['2016-07-01','2016-07-02']
Fails to be highlighted In the Datepicker

My problem is The Array in Which my Database stores all Dates Outputs in the 2016-07-01 i.e yy-mm-dd Format 

So the Question is how to i make datepicker work with the same format


Inserting all Relevant Code Blocks
  1.  
  2. $(function(){
  3. $('#ShowBooking').datepicker({
  4. inline: true,
  5. dateFormat: 'yy-mm-dd',
  6. beforeShowDay: function (date) {
  7. var theday = date.getFullYear() +'-'+ 
  8. (date.getMonth()+1)+ '-' + 
  9. date.getDate();
  10. return [true,$.inArray(theday, DisabledDays) >=0?"specialDate":''];
  11. }
  12. });

This is the code for my Array

  1. <script type="text/javascript">
  2. var DisabledDays = new Array();
  3. <%
  4. Dim index : index = 0
  5. Do Until recobj.EOF
  6. Response.Write "DisabledDays[" & index & "]='" & recobj(0) & "';" & vbNewLine
  7. recobj.MoveNext
  8. index = index + 1
  9. Loop
  10. %>
Any Help From Forums Seniors ? Thank You