is it possible to extend jquery ui calendar to have the following features.
1) i'd like to be able to create a url when the user clicks a day.
ie /mypage?date=15-03-2011 ( any date format is fine )
2) i would like the calendar to add class to each "a href" that represented a date. ie something like
<a href="javascript:void(0)" class="dp1323518400000 开发者_开发问答datepick-weekend datepick-highlight" title="Select Saturday, Dec 10, 2011">10</a>
To put this context. i'm trying to use the calendar to display events that are held on a particular day.
Check this Jquery UI action out.
Use the onSelect callback to create an url, or add a class.
$('.selector').datepicker({
onSelect: function(dateText, inst) {
// Example"
// '/route?date='+ encodeURIComponent(dateText)
}
});
精彩评论