Bug Tracker

Changeset 4490

Show
Ignore:
Timestamp:
01/20/08 22:20:24 (1 year ago)
Author:
grabanski
Message:

The following changes were made to the core for the next jQuery UI release:
* Changed $(selector).datepicker() to $(selector).attachDatepicker().
* Changed $.Datepicker.enableFor(control) to $(selector).enableDatepicker().
* Changed $.Datepicker.disableFor(control) to $(selector).disableDatepicker().
* Changed $.Datepicker.reconfigureFor(control, settings) to $(selector).changeDatepicker(settings).
* Updated compatibility file to reflect changes.

Location:
trunk/ui/current/datepicker
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/current/datepicker/compatibility/jquery-calendar-compatibility.js

    r3760 r4490  
    3939       @return void */ 
    4040    enableFor: function(inputs) { 
    41         $.datepicker.enableFor(inputs); 
     41        $(inputs).enableDatepicker(); 
    4242    }, 
    4343 
     
    4848       @return void */ 
    4949    disableFor: function(inputs) { 
    50         $.datepicker.disableFor(inputs); 
     50        $(inputs).disableDatepicker(); 
    5151    }, 
    5252 
     
    5757       @return void */ 
    5858    reconfigureFor: function(control, settings) { 
    59         $.datepicker.reconfigureFor(control, convertSettings(settings)); 
     59        $(control).changeDatepicker(convertSettings(settings)); 
    6060    }, 
    6161 
     
    9999    noWeekends: function(date) { 
    100100        return $.datepicker.noWeekends(date); 
     101    }, 
     102     
     103    /* Format a date object into a string value. 
     104       @param  date  Date - the date to customise */ 
     105    formatDate: function(date) { 
     106        return $.datepicker.formatDate(date); 
    101107    } 
    102108}); 
     
    125131   @param  settings  object - the new settings to use for this calendar instance (anonymous) 
    126132   @return jQuery object - for chaining further calls */ 
    127 $.fn.calendar = function(settings) { 
     133compatFunction = function(settings) { 
    128134    this.each(function() { 
    129135        for (attrName in $.datepicker._defaults) { 
     
    135141        } 
    136142    }); 
    137     return this.datepicker(convertSettings(settings)); 
     143    return this.attachDatepicker(convertSettings(settings)); 
    138144}; 
     145$.fn.calendar = compatFunction; 
     146$.fn.datepicker = compatFunction; 
    139147 
    140148/* Initialise the calendar. */ 
  • trunk/ui/current/datepicker/compatibility/jquery-calendar-demo.js

    r3762 r4490  
    33var inlineTo = null; 
    44 
    5 $(document).ready(function () { 
     5$(function () { 
    66    $('#alt').attr({ 'disabled':'disabled' }); 
    77    tabs.init(); 
     
    153153    var dateFrom = popUpCal.getDateFor(inlineFrom); 
    154154    var dateTo = popUpCal.getDateFor(inlineTo); 
    155     $('#inlineRange').val(formatDate(dateFrom) + ' to ' + formatDate(dateTo)); 
     155    $('#inlineRange').val(popUpCal.formatDate(dateFrom) + ' to ' + popUpCal.formatDate(dateTo)); 
    156156    popUpCal.reconfigureFor(inlineFrom, {maxDate: dateTo}); 
    157157    popUpCal.reconfigureFor(inlineTo, {minDate: dateFrom}); 
     
    160160function updateInlineRange2(dateStr) { 
    161161    $('#inlineRange2').val(dateStr ? dateStr : 
    162         formatDate(popUpCal.getDateFor('#rangeInline'))); 
    163 } 
    164  
    165 function formatDate(date) { 
    166     var day = date.getDate(); 
    167     var month = date.getMonth() + 1; 
    168     return (day < 10 ? '0' : '') + day + '/' + 
    169         (month < 10 ? '0' : '') + month + '/' + date.getFullYear(); 
     162        popUpCal.formatDate(popUpCal.getDateFor('#rangeInline'))); 
    170163} 
    171164 
  • trunk/ui/current/datepicker/core/index.html

    r4349 r4490  
    3030        <script type="text/javascript" charset="utf-8"> 
    3131            jQuery(function($){ 
    32                 $("#dateinput").datepicker(); 
     32                $("#dateinput").attachDatepicker(); 
    3333            }); 
    3434        </script> 
  • trunk/ui/current/datepicker/core/ui.datepicker.js

    r4414 r4490  
    288288    }, 
    289289 
    290     /* Enable the input field(s) for entry. 
    291        @param  inputs  element - single input field or 
    292                        string - the ID or other jQuery selector of the input field(s) or 
    293                        object - jQuery collection of input fields 
    294        @return the manager object */ 
    295     enableFor: function(inputs) { 
    296         inputs = (inputs.jquery ? inputs : $(inputs)); 
    297         inputs.each(function() { 
    298             this.disabled = false; 
    299             $(this).siblings('button.datepicker_trigger').each(function() { this.disabled = false; }); 
    300             $(this).siblings('img.datepicker_trigger').css({opacity: '1.0', cursor: ''}); 
    301             var $this = this; 
    302             $.datepicker._disabledInputs = $.map($.datepicker._disabledInputs, 
    303                 function(value) { return (value == $this ? null : value); }); // delete entry 
    304         }); 
    305         return this; 
    306     }, 
    307  
    308     /* Disable the input field(s) from entry. 
    309        @param  inputs  element - single input field or 
    310                        string - the ID or other jQuery selector of the input field(s) or 
    311                        object - jQuery collection of input fields 
    312        @return the manager object */ 
    313     disableFor: function(inputs) { 
    314         inputs = (inputs.jquery ? inputs : $(inputs)); 
    315         inputs.each(function() { 
    316             this.disabled = true; 
    317             $(this).siblings('button.datepicker_trigger').each(function() { this.disabled = true; }); 
    318             $(this).siblings('img.datepicker_trigger').css({opacity: '0.5', cursor: 'default'}); 
    319             var $this = this; 
    320             $.datepicker._disabledInputs = $.map($.datepicker._disabledInputs, 
    321                 function(value) { return (value == $this ? null : value); }); // delete entry 
    322             $.datepicker._disabledInputs[$.datepicker._disabledInputs.length] = this; 
    323         }); 
    324         return this; 
    325     }, 
    326  
    327290    /* Is the input field disabled? 
    328291       @param  input  element - single input field or 
     
    338301        } 
    339302        return false; 
    340     }, 
    341  
    342     /* Update the settings for a date picker attached to an input field or division. 
    343        @param  control   element - the input field or div/span attached to the date picker or 
    344                          string - the ID or other jQuery selector of the input field or 
    345                          object - jQuery object for input field or div/span 
    346        @param  settings  object - the new settings to update 
    347        @return the manager object */ 
    348     reconfigureFor: function(control, settings) { 
    349         control = (control.jquery ? control[0] : 
    350             (typeof control == 'string' ? $(control)[0] : control)); 
    351         var inst = this._getInst(control._calId); 
    352         if (inst) { 
    353             extendRemove(inst._settings, settings || {}); 
    354             this._updateDatepicker(inst); 
    355         } 
    356         return this; 
    357303    }, 
    358304 
     
    14761422   @param  settings  object - the new settings to use for this date picker instance (anonymous) 
    14771423   @return jQuery object - for chaining further calls */ 
    1478 $.fn.datepicker = function(settings) { 
     1424$.fn.attachDatepicker = function(settings) { 
    14791425    return this.each(function() { 
    14801426        // check for settings on the control itself - in namespace 'date:' 
     
    15091455}; 
    15101456 
     1457/* Enable the date picker to a jQuery selection. 
     1458   @return jQuery object - for chaining further calls */ 
     1459$.fn.enableDatepicker = function() { 
     1460    return this.each(function() { 
     1461        this.disabled = false; 
     1462        $(this).siblings('button.datepicker_trigger').each(function() { this.disabled = false; }); 
     1463        $(this).siblings('img.datepicker_trigger').css({opacity: '1.0', cursor: ''}); 
     1464        var $this = this; 
     1465        $.datepicker._disabledInputs = $.map($.datepicker._disabledInputs, 
     1466            function(value) { return (value == $this ? null : value); }); // delete entry 
     1467    }); 
     1468} 
     1469 
     1470/* Disable the date picker to a jQuery selection. 
     1471   @return jQuery object - for chaining further calls */ 
     1472$.fn.disableDatepicker = function() { 
     1473    return this.each(function() { 
     1474        this.disabled = true; 
     1475        $(this).siblings('button.datepicker_trigger').each(function() { this.disabled = true; }); 
     1476        $(this).siblings('img.datepicker_trigger').css({opacity: '0.5', cursor: 'default'}); 
     1477        var $this = this; 
     1478        $.datepicker._disabledInputs = $.map($.datepicker._disabledInputs, 
     1479            function(value) { return (value == $this ? null : value); }); // delete entry 
     1480        $.datepicker._disabledInputs[$.datepicker._disabledInputs.length] = this; 
     1481    }); 
     1482} 
     1483 
     1484/* Update the settings for a date picker attached to an input field or division. 
     1485       @param  settings  object - the new settings to update 
     1486       @return jQuery object - for chaining further calls */ 
     1487$.fn.changeDatepicker = function(settings) { 
     1488    return this.each(function() { 
     1489        var inst = $.datepicker._getInst(this._calId); 
     1490        if (inst) { 
     1491            extendRemove(inst._settings, settings || {}); 
     1492            $.datepicker._updateDatepicker(inst); 
     1493        } 
     1494    }); 
     1495} 
     1496     
    15111497/* Initialise the date picker. */ 
    15121498$(document).ready(function() { 
  • trunk/ui/current/datepicker/demo/ui.datepicker.demo.js

    r3900 r4490  
    1717    } 
    1818    // Stylesheets 
    19     $('#altStyle').datepicker({buttonImage: 'img/calendar2.gif', 
     19    $('#altStyle').attachDatepicker({buttonImage: 'img/calendar2.gif', 
    2020        prevText: '<img src="img/prev.gif" style="vertical-align: middle;"/> Prev', 
    2121        nextText: 'Next <img src="img/next.gif" style="vertical-align: middle;"/>'}); 
  • trunk/ui/current/datepicker/index.html

    r4411 r4490  
    3030            <div id="header"> 
    3131                <div> 
    32                     <h1>jQuery UI Datepicker v3.2</h1> 
     32                    <h1>jQuery UI Datepicker v3.3</h1> 
    3333                    <p class="caption">Written by <a href="/">Marc Grabanski</a> and <a href="http://keith-wood.name">Keith Wood</a>.</p> 
    3434                </div> 
     
    3636            <?php $code_nav='ui-datepicker'; include '../code_nav.php' ?> 
    3737            <div id="content"> 
    38                 <h2>jQuery UI Datepicker v3.2 Examples</h2> 
     38                <h2>jQuery UI Datepicker v3.3 Examples</h2> 
    3939                <ul id="tab_menu1" class="tabs"> 
    4040                    <li><a href="#default">Defaults</a></li> 
     
    4747                    <li style="clear: left;"><a href="#range">Date range</a></li> 
    4848                    <li><a href="#misc">Miscellaneous</a></li> 
    49                     <li><a href="#reconfig">Reconfigure</a></li> 
     49                    <li><a href="#change">Change Settings</a></li> 
    5050                    <li><a href="#inline">Inline</a></li> 
    5151                    <li><a href="#styles">Stylesheets</a></li> 
     
    5959                        <input type="text" size="30" value="click to show datepicker" id="defaultFocus"/></p> 
    6060<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    61 $('#defaultFocus').datepicker();     
     61$('#defaultFocus').attachDatepicker();   
    6262</script> 
    6363                    <p><span class="demoLabel">IE select issue:</span> 
     
    9696                        <input type="button" id="enableFocus" value="Disable"/></p> 
    9797<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    98 $('#invokeFocus').datepicker({showOn: 'focus'});     
     98$('#invokeFocus').attachDatepicker({showOn: 'focus'});   
    9999</script> 
    100100                    <p><span class="demoLabel">Appears via text button:</span> 
     
    102102                        <input type="button" id="enableButton" value="Disable"/></p> 
    103103<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    104 $('#invokeButton').datepicker({showOn: 'button', buttonText: '...', 
     104$('#invokeButton').attachDatepicker({showOn: 'button', buttonText: '...', 
    105105    buttonImage: '', buttonImageOnly: false}); 
    106106</script> 
     
    109109                        <input type="button" id="enableBoth" value="Disable"/></p> 
    110110<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    111 $('.invokeBoth').datepicker({showOn: 'both', buttonImage: 'img/calendar.gif', buttonImageOnly: true}); 
     111$('.invokeBoth').attachDatepicker({showOn: 'both', buttonImage: 'img/calendar.gif', buttonImageOnly: true}); 
    112112</script> 
    113113                    <p>You can embed the trigger image within the input area via CSS.</p> 
     
    115115                        <input type="text" size="10" id="embedButton"/></p> 
    116116<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    117 $('#embedButton').datepicker({showOn: 'button', buttonImage: 'img/calendar.gif', buttonImageOnly: true}); 
     117$('#embedButton').attachDatepicker({showOn: 'button', buttonImage: 'img/calendar.gif', buttonImageOnly: true}); 
    118118 
    119119// CSS 
     
    123123<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    124124$('#enableFocus').toggle( 
    125     function () { this.value = 'Enable'; $.datepicker.disableFor('#invokeFocus'); }, 
    126     function () { this.value = 'Disable'; $.datepicker.enableFor('#invokeFocus'); }); 
     125    function () { this.value = 'Enable'; $('#invokeFocus').disableDatepicker(); }, 
     126    function () { this.value = 'Disable'; $('#invokeFocus').enableDatepicker(); }); 
    127127$('#enableButton').toggle( 
    128     function () { this.value = 'Enable'; $.datepicker.disableFor($('#invokeButton')); }, 
    129     function () { this.value = 'Disable'; $.datepicker.enableFor($('#invokeButton')); }); 
     128    function () { this.value = 'Enable'; $('#invokeButton').disableDatepicker(); }, 
     129    function () { this.value = 'Disable'; $('#invokeButton').enableDatepicker(); }); 
    130130$('#enableBoth').toggle( 
    131     function () { this.value = 'Enable'; $.datepicker.disableFor($('.invokeBoth')[0]); }, 
    132     function () { this.value = 'Disable'; $.datepicker.enableFor($('.invokeBoth')[0]); }); 
     131    function () { this.value = 'Enable'; $('.invokeBoth:first').disableDatepicker(); }, 
     132    function () { this.value = 'Disable'; $('.invokeBoth:first').enableDatepicker(); }); 
    133133</script> 
    134134                    <p>The date picker can also be triggered externally for a particular input.</p> 
     
    182182                        <input type="text" size="10" id="restrictControls"/></p> 
    183183<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    184 $('#restrictControls').datepicker({firstDay: 1, changeFirstDay: false, 
     184$('#restrictControls').attachDatepicker({firstDay: 1, changeFirstDay: false, 
    185185    changeMonth: false, changeYear: false}); 
    186186</script> 
     
    190190                        <input type="text" size="10" id="restrictDates"/></p> 
    191191<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    192 $('#restrictDates').datepicker({minDate: new Date(2005, 1 - 1, 26), 
     192$('#restrictDates').attachDatepicker({minDate: new Date(2005, 1 - 1, 26), 
    193193    maxDate: new Date(2007, 1 - 1, 26)}); 
    194194</script> 
     
    220220                        <input type="text" size="10" id="mediumFormat"/></p> 
    221221<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    222 $('#mediumFormat').datepicker({dateFormat: 'M d, yy'}); 
     222$('#mediumFormat').attachDatepicker({dateFormat: 'M d, yy'}); 
    223223</script> 
    224224                    <p><span class="demoLabel">Long format:</span> 
    225225                        <input type="text" size="20" id="longFormat"/></p> 
    226226<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    227 $('#longFormat').datepicker({dateFormat: 'MM d, yy'}); 
     227$('#longFormat').attachDatepicker({dateFormat: 'MM d, yy'}); 
    228228</script> 
    229229                    <p><span class="demoLabel">Full format:</span> 
    230230                        <input type="text" size="30" id="fullFormat"/></p> 
    231231<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    232 $('#fullFormat').datepicker({dateFormat: 'DD, MM d, yy'}); 
     232$('#fullFormat').attachDatepicker({dateFormat: 'DD, MM d, yy'}); 
    233233</script> 
    234234                    <p>Display dates without the century. The century is then determined based on the 
     
    239239                        <input type="text" size="10" id="noCentury"/></p> 
    240240<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    241 $('#noCentury').datepicker({dateFormat: 'dd/mm/y'}); 
     241$('#noCentury').attachDatepicker({dateFormat: 'dd/mm/y'}); 
    242242</script> 
    243243                    <p><span class="demoLabel">ISO date format:</span> 
    244244                        <input type="text" size="10" id="isoFormat"/></p> 
    245245<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    246 $('#isoFormat').datepicker({dateFormat: 'yy-mm-dd'}); 
     246$('#isoFormat').attachDatepicker({dateFormat: 'yy-mm-dd'}); 
    247247</script> 
    248248                    <p><span class="demoLabel">French full format:</span> 
    249249                        <input type="text" size="30" id="frFullFormat"/></p> 
    250250<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    251 $('#frFullFormat').datepicker($.datepicker.regional['fr']); 
    252 $.datepicker.reconfigureFor('#frFullFormat', {dateFormat: 'DD, MM d, yy'}); 
     251$('#frFullFormat').attachDatepicker($.datepicker.regional['fr']); 
     252$('#frFullFormat').changeDatepicker({dateFormat: 'DD, MM d, yy'}); 
    253253</script> 
    254254                    <p>The formatting codes are:</p> 
     
    278278                        <input type="text" size="10" id="noWeekends"/></p> 
    279279<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    280 $('#noWeekends').datepicker({beforeShowDay: $.datepicker.noWeekends}); 
     280$('#noWeekends').attachDatepicker({beforeShowDay: $.datepicker.noWeekends}); 
    281281</script> 
    282282                    <p>Or you can provide your own function. The one below highlights and 
     
    285285                        <input type="text" size="10" id="nationalDays"/></p> 
    286286<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    287 $('#nationalDays').datepicker({beforeShowDay: nationalDays}); 
     287$('#nationalDays').attachDatepicker({beforeShowDay: nationalDays}); 
    288288 
    289289// Highlight certain national days on the calendar 
     
    348348                    <p>And then configure the language per date picker instance.</p> 
    349349<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    350 $('#l10nDatepicker').datepicker($.extend({showStatus: true}, $.datepicker.regional['fr'])); 
    351 $('#rtlDatepicker').datepicker($.extend({showStatus: true}, $.datepicker.regional['he'])); 
     350$('#l10nDatepicker').attachDatepicker($.extend({showStatus: true}, $.datepicker.regional['fr'])); 
     351$('#rtlDatepicker').attachDatepicker($.extend({showStatus: true}, $.datepicker.regional['he'])); 
    352352</script> 
    353353                    <p><strong>Localisation packages:</strong></p> 
     
    363363                        <input type="text" size="10" class="dateRange" id="dTo"/></p> 
    364364<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    365 $('.dateRange').datepicker({beforeShow: customRange}); 
     365$('.dateRange').attachDatepicker({beforeShow: customRange}); 
    366366 
    367367// Customize two date pickers to work as a date range 
     
    378378 
    379379<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    380 $('#rangeSelect').datepicker({rangeSelect: true}); 
     380$('#rangeSelect').attachDatepicker({rangeSelect: true}); 
    381381</script> 
    382382                    <p><span class="demoLabel">Two months with range select:</span> 
    383383                        <input type="text" size="25" id="rangeSelect2Months"/></p> 
    384384<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    385 $('#rangeSelect2Months').datepicker({rangeSelect: true, numberOfMonths: 2}); 
     385$('#rangeSelect2Months').attachDatepicker({rangeSelect: true, numberOfMonths: 2}); 
    386386</script> 
    387387                    <p><span class="demoLabel">Six months with range select:</span> 
    388388                        <input type="text" size="25" id="rangeSelect6Months"/></p> 
    389389<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    390 $('#rangeSelect6Months').datepicker({rangeSelect: true, numberOfMonths: [2, 3], 
     390$('#rangeSelect6Months').attachDatepicker({rangeSelect: true, numberOfMonths: [2, 3], 
    391391    stepMonths: 3, prevText: '&lt;&lt; Previous Months', nextText: 'Next Months &gt;&gt;'}); 
    392392</script> 
     
    398398                        <input type="text" size="10" id="openDateJan01"/></p> 
    399399<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    400 $('#openDateJan01').datepicker({defaultDate: new Date(2007, 1 - 1, 1)}); 
     400$('#openDateJan01').attachDatepicker({defaultDate: new Date(2007, 1 - 1, 1)}); 
    401401</script> 
    402402                    <p><span class="demoLabel">Open at 7 days from today:</span> 
    403403                        <input type="text" size="10" id="openDatePlus7"/></p> 
    404404<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    405 $('#openDatePlus7').datepicker({defaultDate: +7}); 
     405$('#openDatePlus7').attachDatepicker({defaultDate: +7}); 
    406406</script> 
    407407                    <p>Or specify a period from today - 'd' for days, 
     
    419419                        <input type="text" size="10" id="showWeeks"/></p> 
    420420<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    421 $('#showWeeks').datepicker({showWeeks: true, firstDay: 1, changeFirstDay: false, showOtherMonths: true}); 
     421$('#showWeeks').attachDatepicker({showWeeks: true, firstDay: 1, changeFirstDay: false, showOtherMonths: true}); 
    422422</script> 
    423423                    <p>Additional settings let you move the <em>Clear</em>/<em>Close</em> controls 
     
    431431                        <input type="text" size="10" id="addSettings"/></p> 
    432432<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    433 $('#addSettings').datepicker({ 
     433$('#addSettings').attachDatepicker({ 
    434434    closeAtTop: false,  
    435435    mandatory: true, 
     
    485485                        <input type="hidden" size="10" id="linkedDates" disabled="disabled"/></p> 
    486486<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    487 $('#linkedDates').datepicker({ 
     487$('#linkedDates').attachDatepicker({ 
    488488    minDate: new Date(2001, 1 - 1, 1),  
    489489    maxDate: new Date(2010, 12 - 1, 31),  
     
    523523</script> 
    524524                </div> 
    525                 <div id="reconfig" class="tab_group1 container"> 
    526                     <h3>Reconfiguration</h3> 
    527                     <p>If necessary, the date picker for an input (or set of inputs) can be reconfigured 
    528                         on the fly. As an example, here we change the speed at which the date picker appears.</p> 
     525                <div id="change" class="tab_group1 container"> 
     526                    <h3>Changing Settings</h3> 
     527                    <p>If necessary, the datepicker settings for an input (or set of inputs) can be changed 
     528                        on the fly. As an example, here we change the speed at which the datepicker appears.</p> 
    529529                    <p><span class="demoLabel">Display speed:</span> 
    530530                        <select id="speedSelectr"> 
     
    535535                        </select> 
    536536                    </p> 
    537                     <p><span class="demoLabel">Reconfigured date picker:</span> 
    538                         <input type="text" size="10" id="reconfigureCal"/></p> 
     537                    <p><span class="demoLabel">Change datepicker:</span> 
     538                        <input type="text" size="10" id="changeDP"/></p> 
    539539                    <p>When the option in the select changes, the following function is called:</p> 
    540540<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    541 $('#reconfigureCal').datepicker(); 
    542 // Reconfigure the calendar to selected speed. 
     541$('#changeDP').attachDatepicker(); 
     542// Change the datepicker to selected speed. 
    543543$("#speedSelectr").change(function() { 
    544     $.datepicker.reconfigureFor('#reconfigureCal', {speed: $(this).val()}); 
     544    $('#changeDP').changeDatepicker({speed: $(this).val()}); 
    545545}); 
    546546</script> 
     
    569569 
    570570// Invoke inline configured datepickers 
    571 $('.inlineConfig').datepicker(); 
     571$('.inlineConfig').attachDatepicker(); 
    572572</script> 
    573573                </div> 
     
    580580<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    581581// HTML &lt;span id="inlineDemo">&lt;/span> 
    582 $('#inlineDemo').datepicker({ 
     582$('#inlineDemo').attachDatepicker({ 
    583583    onSelect: function(date) { 
    584584        alert(date); 
     
    596596                    </p> 
    597597<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    598 $('#rangeInline').datepicker({rangeSelect: true, rangeSeparator: ' to ', 
     598$('#rangeInline').attachDatepicker({rangeSelect: true, rangeSeparator: ' to ', 
    599599    numberOfMonths: 2, onSelect: updateInlineRange}); 
    600600$('#rangeInline').find('div:first').width(370); // Unfortunately not automatic 
     
    755755                            Customize each calendar with <a href="http://docs.jquery.com/UI/Datepicker/datepicker#options" target="_blank">additional settings</a> 
    756756                            as part of the initialization if necessary. 
    757 <pre><code class="javascript">$('input selector').datepicker(); 
    758 $('input selector').datepicker({defaultDate: +7});</code></pre> 
     757<pre><code class="javascript">$('input selector').attachDatepicker(); 
     758$('input selector').attachDatepicker({defaultDate: +7});</code></pre> 
    759759                        </li> 
    760760                    </ol>