1/** 2 * Wcj-weekpicker. 3 * 4 * @version 5.6.2 5 * @package Booster_For_WooCommerce/includes/JS 6 */ 7 8jQuery( document ).ready( 9 function() { 10 jQuery( "input[display='week']" ).each( 11 function() { 12 jQuery( this ).datepicker( 13 { 14 dateFormat: jQuery( this ).attr( "dateformat" ), 15 minDate: jQuery( this ).attr( "mindate" ), 16 maxDate: jQuery( this ).attr( "maxdate" ), 17 firstDay: jQuery( this ).attr( "firstday" ), 18 changeYear: jQuery( this ).attr( "changeyear" ), 19 yearRange: jQuery( this ).attr( "yearrange" ), 20 showOtherMonths: true, 21 selectOtherMonths: true, 22 changeMonth: true, 23 showWeek: true, 24 beforeShow: function(dateText, inst) { 25 // for week highighting. 26 jQuery( ".ui-datepicker-calendar tbody" ).on( 27 "mousemove", 28 "tr", 29 function() { 30 jQuery( this ).find( "td a" ).addClass( "ui-state-hover" ); 31 jQuery( this ).find( ".ui-datepicker-week-col" ).addClass( "ui-state-hover" ); 32 } 33 ); 34 jQuery( ".ui-datepicker-calendar tbody" ).on( 35 "mouseleave", 36 "tr", 37 function() { 38 jQuery( this ).find( "td a" ).removeClass( "ui-state-hover" ); 39 jQuery( this ).find( ".ui-datepicker-week-col" ).removeClass( "ui-state-hover" ); 40 } 41 ); 42 }, 43 onClose: function(dateText, inst) { 44 var date = jQuery( this ).datepicker( "getDate" ); 45 if (date != null) { 46 var dateFormat = inst.settings.dateFormat || jQuery( this ).datepicker._defaults.dateFormat; 47 var endDate = new Date( date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 6 ); 48 var endDateFormatted = jQuery.datepicker.formatDate( dateFormat, endDate, inst.settings ); 49 jQuery( this ).val( dateText + " - " + endDateFormatted ); 50 } 51 // disable live listeners so they dont impact other instances. 52 jQuery( '.ui-datepicker-calendar tbody tr' ).off( 'mousemove' ); 53 jQuery( '.ui-datepicker-calendar tbody tr' ).off( 'mouseleave' ); 54 } 55 } 56 ); 57 } 58 ); 59 } 60);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.