Run SQL precedent that disables dates in Datepicker

Asked

Viewed 53 times

0

I have a system with a datepicker, and I want some dates to be automatically disabled. These dates should automatically populate the array that disables the dates. (Today it is manual as shows the function below)

var disableddates = ["10-12-2015", "11-20-2015", "12-21-2015", "12-22-2015", "12-23-2015", "12-24-2015", "12-25-2015", "12-28-2015", "12-29-2015", "12-30-2015", "12-31-2015", "1-1-2016"];

I have a SQL Server precedent that brings a list of all these dates. How to call it before calling the datepicker by disabling these dates?

  • What platform (language) are you developing? You can request dates by AJAX.

  • The system was developed in ASP Classico. I have no idea how to make this request with AJAX. Could you give me some tips please?

1 answer

0

I made a call to Procedure before the call to the function to disable dates, and I passed the result by variable, with the dates concatenated and formatted as it enters datepicker: var disableddates = <%=vardatasfim %>

The variable vardisableddates is used in function to block weekend, and used as parameter in beforeShowDay.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.