PageSourceSearch

https://ecobest.ru/js/jquery/ui/jquery.ui.datepicker-extension.js

js ecobest.ru collected 2026-10-02 19:32:51 UTC 1,229 bytes, 37 lines download raw bytes

1/*
2	Gisli Konra?
3	http://stackoverflow.com/questions/4101287/proper-way-to-add-a-callback-to-jquery-datepicker?answertab=votes#tab-top
4	http://learn.javascript.ru/decorators
5*/
6
7/*
8Ðàñøèðåíèå ñòàíäàðòíîãî ôóíêöèîíàëà Datepicker UI
9ìåòîä _adjustDate - ñðàáàòûâàåò ïðè ïåðåêëþ÷åíèè ìåñÿöåâ, ðàñøèðÿåò âîçìîæíîñòü äîáàâëåíèÿ callback ôóíêöèè ïîñëå ïåðåêëþ÷åíèÿ.
10Äàííûõ êîä èñïîëüçóåòñÿ äëÿ ñàéòà pro-yachting.ru ïðè ðàáîòå ñ êàëåíäàðåì. TODO: ïðèìåíèòü äàííûé êîä äëÿ êàëåíäàðÿ íà admos-gifts.ru
11
12ïðèìåð âûçîâà:
13
14$( "#datepicker" ).datepicker({ 
15    afterAdjustDate: function(i,o,p){
16        alert('works');
17    }
18});
19
20*/
21
22
23(function($){
24    var datepickerExtensions = {
25        _oldAdjustDate: $.datepicker._adjustDate,
26        _adjustDate: function(id, offset, period) { 
27            var target = $(id);
28            var inst = this._getInst(target[0]);
29            var afterAdjustDate = this._get(inst, 'afterAdjustDate');
30            this._oldAdjustDate(id, offset, period);
31            if(afterAdjustDate && typeof afterAdjustDate === 'function'){
32                afterAdjustDate(id, offset, period);
33            }
34        }
35    }
36    $.extend($.datepicker, datepickerExtensions);
37})(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.