I am currently doing project on task reminder where user can enter tasks for certain dates.For overview of user's task i am using jquery ui datepicker(inline).I just want to highlight all those dates given by the user. Thank you in advance!!
Try with
$(function() {
$("#datepicker").datepicker({
beforeShowDay: function(d) {
var a = new Date(2012, 3, 10); // April 10, 2012
var b = new Date(2012, 3, 20); // April 20, 2012
return [true, a <= d && d <= b ? "my-class" : ""];
}
});
});
here is an example: http://jsfiddle.net/qaEuj/
See this answer: Highlight dates in jquery UI datepicker
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.