Highlight weeks in datepicker
Hello,
i'm trying to highlight weeks in the datepicker. Since i updated my jQuery UI to v1.10 it does not work anymore. (I used v1.8.14 before).
Here is my code that worked well before :
- $( "#top10week" ).datepicker({
- dateFormat: "yy-mm-dd",
- firstDay: 1,
- showOtherMonths: true,
- selectOtherMonths: true,
- changeMonth: true,
- changeYear: true,
- showWeek: true,
- beforeShow: function(dateText, inst) {
- $(".ui-datepicker-calendar tbody tr").on("mousemove", function() {
- $(this).find('td a').addClass("ui-state-hover");
- });
- $(".ui-datepicker-calendar tbody tr").on("mouseleave", function() {
- $(this).find('td a').removeClass("ui-state-hover");
- });
- },
- onClose: function(dateText, inst) {
- // disable live listeners so they dont impact other instances
- $(".ui-datepicker-calendar tbody tr").off("mousemove");
- $(".ui-datepicker-calendar tbody tr").off("mouseleave");
- }
- });
And now, it looks like the .on() in the beforeShow is not run anymore (but beforeShow is fired). But if I try it in my browser (using firebug), it works well.. it's just like if the html nodes were not already in the html..
Any idea to solve my problem?
Regards