With a datepicker it seems complicated, you can show a popup and not allow the user to use a date that is not in the list returned by your API. (with the on change event).
If you really want to have grey out date, you may want to try to check if a javascript date picker may allow you to do that.
There is also some calendar widget in the app store that may allows you to do that, or something alike