The beforeShowDay callback allows you to do this. It is a function that takes a Date as a parameter and returns an array with [0] being true if the date is selectable, false if not, [1] being a CSS class to apply to that date cell, [2] being an optional popup tooltip for the date.
$('#mydate').datepicker({beforeShowDay: highlightOdds}); function highlightOdds(date) { return [true, date.getDate() % 2 == 1 ? 'odd' : '']; }
jQuery UI Datepicker with jQuery tipsy
[JqueryUI] Date Picker - color cell day
JQuery UI 官方連結
沒有留言:
張貼留言