javascript - jQuery Datepicker UI Tooltip -
is possible add tooltip disabled dates in jquery datepicker?
$(function() { $('#datepicker').datepicker({ mindate : 0, maxdate : +30, beforeshowday: function(date) { return [true, 'highlight', 'the custom title']; } }); });
my code puts tooltip dates.
yes. possible. check below link know more on disabling date.
http://api.jqueryui.com/datepicker/#option-beforeshowday
below code
var disableddates = ["11-2-2016","19-2-2016","28-2-2016"]; function disabledate(date) { dmy = date.getdate() + "-" + (date.getmonth()+1) + "-" + date.getfullyear(); if ($.inarray(dmy, disableddates) < 0) { return [true,"",""]; } else { return [false,"","this disabled"]; } } $('.datepicker').datepicker({ beforeshowday: disabledate });
Comments
Post a Comment