how to disable already booked dates?

喜欢而已 提交于 2019-12-05 07:45:54
VladNeacsu

This fiddle should help you, you just need to figure out the array of dates you want to disable

 var array = ["2015-06-14","2015-06-15","2015-06-16"]

$('input').datepicker({
  beforeShowDay: function(date){
    var string = jQuery.datepicker.formatDate('yy-mm-dd', date);
    return [ array.indexOf(string) == -1 ]
  }
});

http://jsfiddle.net/CxNNh/2201/

here is the updated jsfiddle that works for me

http://jsfiddle.net/CxNNh/2202/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!