Abdalla Elawad

Abdalla Elawad

  • NA
  • 1k
  • 215.6k

how can i disable date Friday and Saturday

Dec 29 2019 12:47 AM
HELLO PROGRAMMER
 
how can i disable date Friday and Saturday using like below
  1. <script type="text/javascript">  
  2. var dateToday = new Date();  
  3. $(document).ready(function () {  
  4. var dp = $("#DateTextbox");  
  5. dp.datepicker({  
  6. changeMonth: true,  
  7. changeYear: true,  
  8. minDate: dateToday,  
  9. format: "dd.mm.yyyy",  
  10. maxDate:(2019,12,3),  
  11. language: "tr",  
  12. beforeShowDay: function (date) {  
  13. var show = true;  
  14. if (date.getDay() == 5) show = false  
  15. return [show];  
  16. }  
  17. });  
  18. });  

Answers (2)