1/*! 2 * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2021 3 * @package yii2-widgets 4 * @subpackage yii2-widget-datepicker 5 * @version 1.4.8 6 * 7 * Extension to bootstrap datepicker to use noconflict approach 8 * so that the plugin does not conflict with other jquery plugins 9 * of similar name 10 * 11 * Built for Yii Framework 2.0 12 * Author: Kartik Visweswaran 13 * For more Yii related demos visit http://demos.krajee.com 14 */ 15var initDPRemove = function () { 16}, initDPAddon = function () { 17}; 18(function ($) { 19 "use strict"; 20 $.fn.kvDatepicker = $.fn.datepicker.noConflict(); 21 initDPRemove = function (id, range) { 22 var $id = $('#' + id), $el = $id.parent(), $input; 23 $el.find('.kv-date-remove').on('click.kvdatepicker', function () { 24 if (range) { 25 $el.find('input[type="text"]').each(function () { 26 $(this).kvDatepicker('clearDates').trigger('change'); 27 }); 28 } else { 29 $el.kvDatepicker('clearDates'); 30 $input = $el.is('input') ? $el : $el.find('input[type="text"]'); 31 $input.trigger('change'); 32 } 33 }); 34 }; 35 initDPAddon = function (id) { 36 var $id = $('#' + id), $el = $id.parent(), 37 pickers = '.input-group-addon:not(.kv-date-picker):not(.kv-date-remove)' + 38 ',.input-group-text:not(.kv-date-picker):not(.kv-date-remove)'; 39 $el.find(pickers).each(function () { 40 var $addon = $(this); 41 $addon.on('click.kvdatepicker', function () { 42 $el.kvDatepicker('hide'); 43 }); 44 }); 45 $el.find('.input-group-addon.kv-date-picker').on('click.kvdatepicker', function () { 46 $id.focus(); 47 }); 48 }; 49})(window.jQuery);
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.