Skip Disabled Dates and Select/ Set Next and Prev Enabled date in Set Date

Skip Disabled Dates and Select/ Set Next and Prev Enabled date in Set Date

Can you please take a look at This Demo

 have a UI datepicker which has only two days Wednsday and Saturday enabled now I need to set the selected value in datepicke not based on date but based on if the item is enabled or not. For example, on loading, instead of showing today as selected date, highlight the next available day and ...

A- On load Set the First available enabled Cell (Not Today) as selected date
B- On #next click set the date of datepicke to the First available (enabled cell/date) and so on (continue same story on multi click)
C- On #prev click set the date of datepicke to the Prev available (enabled cell/date) and so on (continue same story on multi click)


$("#next").on("click", function() { //$("#datepicker").('setDate', NextAvilableDate); }); $("#prev").on("click", function() { //$("#datepicker").('setDate', NextAvilableDate); });


DEMO