1(function ($) { 2 3 //Datepicker v1 - https://www.daterangepicker.com/ 4 5 var $inputdates = $('#dates'); 6 $(function() { 7 $inputdates.daterangepicker({ 8 autoUpdateInput: false, 9 autoApply:true, 10 minDate:new Date(), 11 locale: { 12 cancelLabel: 'anuluj', 13 applyLabel: 'Zastosuj', 14 "daysOfWeek": [ 15 "niedz.", 16 "pon.", 17 "wt", 18 "År.", 19 "czw.", 20 "pt.", 21 "sob." 22 ], 23 "monthNames": [ 24 "styczeÅ", 25 "luty", 26 "marzec", 27 "kwiecieÅ", 28 "maj", 29 "czerwiec", 30 "lipiec", 31 "sierpieÅ", 32 "wrzesieÅ", 33 "paździrnik", 34 "listopad", 35 "grudzieÅ" 36 ], 37 "firstDay": 1 38 } 39 }); 40 $inputdates.on('apply.daterangepicker', function(ev, picker) { 41 $(this).val(picker.startDate.format('YYYY-MM-DD') + ' - ' + picker.endDate.format('YYYY-MM-DD')); 42 }); 43 $inputdates.on('cancel.daterangepicker', function(ev, picker) { 44 $(this).val(''); 45 }); 46 }); 47 48 /* 49 //Datepicker V2 - https://easepick.com/ 50 $(function () { 51 52 const DateTime = easepick.DateTime; 53 const bookedDates = [ 54 ['2023-09-01', '2023-09-04'], 55 '2023-09-07', 56 ['2023-10-11', '2023-10-17'], 57 ].map(d => { 58 if (d instanceof Array) { 59 const start = new DateTime(d[0], 'YYYY-MM-DD'); 60 const end = new DateTime(d[1], 'YYYY-MM-DD'); 61 62 return [start, end]; 63 } 64 65 return new DateTime(d, 'YYYY-MM-DD'); 66 }); 67 68 69 const picker = new easepick.create({ 70 element: document.getElementById('dates'), 71 css: [ 72 'css/daterangepicker_v2.css', 73 ], 74 lang: 'pl-PL', // Language tags https://www.techonthenet.com/js/language_tags.php 75 format: "MM/DD/YYYY", 76 calendars: 2, 77 grid: 2, 78 zIndex: 99999, 79 plugins: ['LockPlugin', 'RangePlugin'], 80 RangePlugin: { 81 tooltipNumber(num) { 82 return num - 1; 83 }, 84 locale: { 85 one: 'night', 86 other: 'nights', 87 }, 88 }, 89 LockPlugin: { 90 minDate: new Date(), 91 minDays: 1, 92 inseparable: false, 93 filter(date, picked) { 94 if (picked.length === 1) { 95 const incl = date.isBefore(picked[0]) ? '[)' : '(]'; 96 return !picked[0].isSame(date, 'day') && date.inArray(bookedDates, incl); 97 } 98 return date.inArray(bookedDates, '[)'); 99 } 100 }, 101 }); 102 103 }); // End Easypick 104 */ 105})(jQuery); 106
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.