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 }); 

demo : https://jsfiddle.net/j2caztgu/


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -