Bug Tracker

Show
Ignore:
Timestamp:
01/11/08 01:51:57 (8 months ago)
Author:
kbwood.au
Message:

Demonstrate defaultDate/minDate/maxDate as relative days/weeks/months/years

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/current/datepicker/index.html

    r4406 r4411  
    199199<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    200200$('#relativeDates').datepicker({minDate: 0, maxDate: 365}); 
     201</script> 
     202                    <p>The relative dates can also be specified as a number and a period - 
     203                        'd' for days, 'w' for weeks, 'm' for months, or 'y' for years.</p> 
     204                    <p><span class="demoLabel">Limited dates (extended):</span> 
     205                        <input type="text" size="10" id="extendedDates"/></p> 
     206<script type="text/jsdemo" charset="utf-8" class="demojs"> 
     207$('#extendedDates').datepicker({minDate: '-1d', maxDate: '6y'}); 
    201208</script> 
    202209                    <p>Note that the range of selectable months and years changes appropriately. Also, 
     
    397404<script type="text/jsdemo" charset="utf-8" class="demojs"> 
    398405$('#openDatePlus7').datepicker({defaultDate: +7}); 
     406</script> 
     407                    <p>Or specify a period from today - 'd' for days, 
     408                        'w' for weeks, 'm' for months, or 'y' for years.</span> 
     409                    <p><span class="demoLabel">Open at 2 weeks from today:</span> 
     410                        <input type="text" size="10" id="openDate2Weeks"/></p> 
     411<script type="text/jsdemo" charset="utf-8" class="demojs"> 
     412$('#openDate2Weeks').datepicker({defaultDate: '2w'}); 
    399413</script> 
    400414                    <p>Show the weeks of the year. Defaults to the ISO 8601 definition (weeks start