Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
68f8e3c
Datepicker: Initial commit of widget rewrite work from old branch
tjvantoll Aug 26, 2013
5a78355
Datepicker: Remove delayed focus
scottgonzalez Jan 29, 2015
e50d6d3
Datepicker: Update tests and demos for new structure
tjvantoll Aug 30, 2013
9ec69cc
Datepicker: Fix the `eachDay` option
jzaefferer Sep 11, 2013
9bdb478
Datepicker: Only apply the `ui-state-focus` class name to one cell
tjvantoll Oct 30, 2013
8983fee
Datepicker: Clean up tests
tjvantoll Nov 2, 2013
b589390
Datepicker: Support changing the `appendTo` option after init
tjvantoll Nov 15, 2013
5fbe668
Datepicker: Various changes for the `showWeek` option
tjvantoll Nov 15, 2013
1a83120
Datepicker: Support `position` option changes after init
tjvantoll Nov 18, 2013
13cd6c2
Datepicker: Support changing `eachDay` after initialization
tjvantoll Nov 19, 2013
ab94999
Datepicker: Allow `dateFormat` to be changed after init
tjvantoll Nov 20, 2013
bfd8f26
Datepicker: Add test to ensure the `<input>`'s value is preselected
tjvantoll Nov 20, 2013
cc5a4bc
Datepicker: Support destroying inline datepickers
tjvantoll Nov 22, 2013
e87a5d8
Datepicker: Add `value()` and `valueAsDate()` methods
tjvantoll Nov 21, 2013
ff4bfd6
Datepicker: Fix key handling implementation and tests
tjvantoll Nov 22, 2013
ffc8ab2
Datepicker: Use Globalize 1.0.0
rxaviers Nov 30, 2013
605387d
Datepicker: Update key handling implementation and tests
tjvantoll Dec 27, 2013
104f3e6
Datepicker: Re-adding mouse tests
tjvantoll Jan 2, 2014
b4fe65a
Datepicker: Add an `isValid()` method
tjvantoll Jan 3, 2014
feedc57
Datepicker: Handle invalid values in `value()` and `valueAsDate()`
tjvantoll Jan 3, 2014
fd215f1
Datepicker: Update the picker as the user types valid dates
tjvantoll Jan 3, 2014
a9d6a65
Date: Update test suite to coding standards
tjvantoll Jan 9, 2014
77d7dd2
Date: Make `$.date()` a constructor function
tjvantoll Jan 9, 2014
cfea8df
Datepicker: Fix code style issues
fnagel Apr 23, 2014
f28b70e
Datepicker: Rename `select()` method to `_select()`
fnagel Apr 26, 2014
9c66d2e
Datepicker: Use `short` instead of `abbreviated` format for table header
fnagel Apr 26, 2014
ab2cb90
Datepicker: Properly define default for `dateFormat` option
fnagel Apr 26, 2014
6324828
Datepicker: Fix populate alternate field demo
fnagel Apr 26, 2014
a11e87c
Datepicker: Fix icon trigger demo
fnagel Apr 26, 2014
35b52a0
Datepicker: Introduce value option
fnagel May 15, 2014
510ba08
Calendar: Add calendar widget
fnagel Jun 3, 2014
f88a063
Calendar: Add min and max option.
fnagel Jun 4, 2014
6ef023f
Calendar: Remove select callback reference
fnagel Jun 4, 2014
5773640
Datepicker: Code clean up for events
fnagel Jun 5, 2014
63bdc3e
Datepicker: Remove unwanted keyboard shortcut
fnagel Jun 5, 2014
258a3ff
Datepicker: Simplify usage of calendar options and avoid duplications
fnagel Jun 12, 2014
6dfcd93
Datepicker tests: Add open and close unit tests
fnagel Jun 16, 2014
4302539
Datepicker: Improve document click event
fnagel Jun 17, 2014
90c704f
Calendar: Fix broken day table cell attributes
fnagel Jun 17, 2014
398ce1b
Datepicker tests: Rewrite event unit tests
fnagel Jun 17, 2014
35842c8
Calendar: Fix multiple calendar styles
fnagel Jun 17, 2014
fd3a68c
Calendar: Fix German localization
fnagel Jun 17, 2014
40e8519
Datepicker: Fix localization demo
fnagel Jun 18, 2014
b9d8f62
Datepicker: Several minor code improvements
fnagel Jun 18, 2014
2e2787d
Calendar: Fix hover event setting and removing
fnagel Jun 18, 2014
5df6d39
Datepicker: Improve localization handling, code style
fnagel Jun 19, 2014
9461f66
Calendar: Add buttons option
fnagel Jun 19, 2014
50f477f
Calendar: Adjust files to match reorganization of external directory
fnagel Jul 2, 2014
95fd20f
Datepicker tests: Remove pass-through options unit tests
fnagel Aug 29, 2014
e507477
Calendar: Use _on for link hover events
fnagel Aug 30, 2014
3289158
Datepicker: Add missing handling for disabled option
fnagel Sep 1, 2014
ee83c37
Calendar: Remove option method overwrite
fnagel Nov 7, 2014
43f66b8
Calendar: Make use of _setOptions to call refresh
fnagel Dec 18, 2014
9d423e5
Calendar: Sanitize active descendant id selector
fnagel Dec 28, 2014
33b1820
Calendar: Clean up demos.
fnagel Jan 18, 2015
cc91adf
Calendar: Use document.activeElement for retrieving focused element
fnagel Jan 19, 2015
91ff2ca
Datepicker: Run datepicker tests in Grunt qunit task
fnagel Jan 19, 2015
4778efc
Datepicker: Fix visual tests
fnagel Jan 20, 2015
c1b6891
Datepicker: Update description metadata
scottgonzalez Jan 29, 2015
2ea46ae
Calendar: Add build metadata
scottgonzalez Jan 29, 2015
876aed3
Datepicker: Make Calendar pass-through options more dynamic
fnagel Jan 20, 2015
a5734cd
Datepicker: Remove whitespace
fnagel Jan 20, 2015
11c1735
Calendar: Use button instead of link elements for day items
fnagel Jan 20, 2015
c29b5e4
Calendar: Fix border style for multiple months
fnagel Jan 20, 2015
d96ad14
Calendar: Clean up styles, add comments
fnagel Jan 30, 2015
bbe1eff
Calendar: Adjust styles to match theme changes
fnagel Jan 30, 2015
ec0d679
Calendar: Remove selected property from $.date
fnagel Jan 24, 2015
4c2229f
Calendar: Fix month jumping WIP
fnagel Jan 24, 2015
d9ee3a1
Calendar tests: Fix dateFormat option test
fnagel Mar 24, 2015
a3df6dd
Calendar: Add comment in _needsRefresh method
fnagel Apr 10, 2015
71d8f16
Merge branch 'master' into datepicker
scottgonzalez Jul 15, 2015
b5bae45
Spinner: Fix demos to use old Globalize
scottgonzalez Jul 15, 2015
d0a5a7a
Datepicker: Use Globalize 1.0.0
rxaviers Sep 3, 2014
b39bb72
Datepicker: Use Globalize 1.0.0
rxaviers Sep 4, 2014
a16a788
Datepicker: Use Globalize 1.0.0
rxaviers Sep 4, 2014
846852a
Datepicker: Use Globalize 1.0.0
rxaviers Sep 4, 2014
9d552b7
Datepicker: Use Globalize 1.0.0
rxaviers Sep 4, 2014
fda7a7e
Datepicker: Use Globalize 1.0.0
rxaviers Sep 4, 2014
82ea79c
Datepicker: Use Globalize 1.0.0
rxaviers Sep 4, 2014
b6d7436
(fix) Datepicker: Use Globalize 1.0.0
rxaviers Sep 4, 2014
5d044dd
(fix) Datepicker: Use Globalize 1.0.0
rxaviers Sep 4, 2014
7f432ed
(fix) Datepicker: Use Globalize 1.0.0
rxaviers Sep 4, 2014
e56c2b4
(fix) Datepicker: Use Globalize 1.0.0
rxaviers Sep 4, 2014
e0acb2d
Datepicker: Use Globalize 1.0.0
fnagel Apr 25, 2015
8732ff7
Datepicker: Use Globalize 1.0.0
fnagel Apr 30, 2015
76c74e5
Datepicker: Use Globalize 1.0.0
fnagel Apr 30, 2015
8238c25
Merge branch 'datepicker' into datepicker-globalize-1.x
fnagel Apr 30, 2015
f9ba50d
Calendar: Update Globalize to 1.0.0
fnagel Jul 27, 2015
6db02da
Calendar: Re-introduce formatDate option
fnagel Jul 27, 2015
ce70446
Datepicker: Update to Globalize 1.0.0
fnagel Jul 28, 2015
8bd4030
Datepicker: Re-introduce formatDate option, simplify Globalize usage
fnagel Jul 28, 2015
31d9184
Merge branch 'master' into datepicker
scottgonzalez Aug 20, 2015
a307992
Calendar: Fix weekday name jumping when using numberOfMonths option
fnagel Aug 25, 2015
38101a4
Datepicker: Fix icon trigger demo
fnagel Aug 25, 2015
09be7b3
Calendar: Fix view when moving between multiple months with keyboard
fnagel Aug 25, 2015
c5b2d85
Calendar: Make use of escapeSelector method
fnagel Aug 25, 2015
483aecb
Calendar tests: Fix and clean-up $.ui.calendarDate unit tests
fnagel Aug 25, 2015
462f92f
Calendar tests: Fix wrong data-widget attribute
fnagel Aug 25, 2015
9bc5fd2
Calendar: Some code style and CGL fixes
fnagel Aug 25, 2015
31908a1
Calendar: Make header prev / next buttons min / max option aware
fnagel Aug 26, 2015
3135e5b
Calendar: Use day of the month instead day of the week for range
fnagel Aug 26, 2015
9c88ac9
Calendar tests: Fix min / max range header button state tests
fnagel Aug 26, 2015
430715b
Calendar: Use day of the month instead day of the week in setMonth
fnagel Aug 26, 2015
e6fe401
Datepicker: Use button instead of a link in icon trigger demo
fnagel Sep 2, 2015
558c31c
Calendar tests: Add header buttons test when using date below min option
fnagel Sep 2, 2015
521604e
Calendar tests: Test for using right arrow button with numberOfMonth
fnagel Sep 2, 2015
af7d200
Calendar: Remove some obsolete todo comments
fnagel Sep 10, 2015
dcef453
Calendar: Move custom date object to ui namespace
fnagel Sep 27, 2015
8a169db
Calendar: Remove all unused methods from custom date object
fnagel Sep 27, 2015
d650fa9
Calendar: Fix some jshint issues
fnagel Sep 27, 2015
3e14e0f
Calendar tests: Add comment to number of month test
fnagel Sep 27, 2015
66828b1
Calendar: Remove _refresh method
fnagel Sep 27, 2015
7e8b723
Merge branch 'master' into datepicker
fnagel Oct 7, 2015
2fe43bb
Calendar: Fix jscs errors after merging master
fnagel Oct 8, 2015
1566cf1
Calendar: Remove Globalize.cldr.supplemental.weekData dependency
fnagel Nov 16, 2015
c43149d
Calendar: Use globalize-runtime with compiled locales
fnagel Nov 18, 2015
9a879d0
Calendar: Fix first day of week calculation for non latin locales
fnagel Nov 18, 2015
d53f549
Datepicker: Fix outdated Globalize format option in date-format demo
fnagel Nov 18, 2015
9fdefee
Calendar: Remove unused data-modules attribute from localization demo
fnagel Nov 18, 2015
f646ba9
Date tests: Fix first day of week calculation for non latin locales
fnagel Nov 18, 2015
f2c9c9a
Calendar tests: Use globalize-runtime with compiled locales
fnagel Nov 18, 2015
705b674
Calendar tests: Add missing Gobalize formatter / parser full
fnagel Nov 18, 2015
7ed4554
Calendar: Fix jshint issues
fnagel Nov 25, 2015
c10ef0a
Merge branch 'master' into datepicker
fnagel Dec 2, 2015
5d3bdde
Calendar: Update Button widget implementation to latest changes
fnagel Dec 2, 2015
e63835c
Calendar tests: Fix and update button advances unit tests
fnagel Dec 2, 2015
8c10fce
Calendar: Fix header data
fnagel Dec 2, 2015
e0bbcb8
Calendar: Add css-dependency-comments based on jQuery Mobile
fnagel Dec 2, 2015
0886be0
Date: Improve header data
fnagel Dec 2, 2015
51ec90c
Calendar: Fix focus issues
fnagel Dec 2, 2015
5c56181
Calendar: Fix ARIA ids for multiple months
fnagel Dec 2, 2015
4715400
Calendar tests: Adjust structure tests to latest changes
fnagel Dec 3, 2015
ec3f117
Datepicker: Improve tab order handling
fnagel Dec 3, 2015
ee93b18
Calendar: Let datepicker handle focus after date selection
fnagel Dec 3, 2015
b0652dc
Calendar: Do not rebuild whole calendar when selecting date
fnagel Dec 3, 2015
f04a393
Calendar: Fix line indention
fnagel Dec 4, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ grunt.initConfig({
findNestedDependencies: true,
skipModuleInsertion: true,
exclude: [ "jquery" ],
include: expandFiles( [ "ui/**/*.js", "!ui/core.js", "!ui/i18n/*" ] ),
include: expandFiles( [
"ui/**/*.js",
"!ui/widgets/calendar.js",
"!ui/widgets/datepicker.js",
"!ui/i18n/*"
] ),
out: "dist/jquery-ui.js",
wrap: {
start: createBanner( uiFiles ),
Expand Down Expand Up @@ -261,6 +266,16 @@ grunt.initConfig({
destPrefix: "external"
},
files: {
"cldrjs/cldr.js": "cldrjs/dist/cldr.js",
"cldrjs/cldr/event.js": "cldrjs/dist/cldr/event.js",
"cldrjs/cldr/supplemental.js": "cldrjs/dist/cldr/supplemental.js",
"cldrjs/LICENSE-MIT": "cldrjs/LICENSE-MIT",

"globalize/globalize-runtime.js": "globalize/dist/globalize-runtime.js",
"globalize/globalize-runtime/number.js": "globalize/dist/globalize-runtime/number.js",
"globalize/globalize-runtime/date.js": "globalize/dist/globalize-runtime/date.js",
"globalize/LICENSE.txt": "globalize/LICENSE.txt",

"qunit/qunit.js": "qunit/qunit/qunit.js",
"qunit/qunit.css": "qunit/qunit/qunit.css",
"qunit/LICENSE.txt": "qunit/LICENSE.txt",
Expand Down Expand Up @@ -422,6 +437,41 @@ grunt.registerTask( "update-authors", function() {
});
});

grunt.registerTask( "compile-globalize", function() {
var formatters,
Globalize = require( "globalize" ),
globalizeCompiler = require( "globalize-compiler" ),
cldrData = require( "cldr-data" ),
languages = [ "ar", "en", "de", "es", "zh" ];

Globalize.load( cldrData.entireMainFor.apply( this, languages ) );
Globalize.load( cldrData.entireSupplemental() );

formatters = languages.reduce( function( ret, language ) {
var globalize = new Globalize( language );

ret = ret.concat([
globalize.dateFormatter( { raw: "EEEEEE" } ),
globalize.dateFormatter( { raw: "EEEEE" } ),
globalize.dateFormatter( { raw: "EEEE" } ),
globalize.dateFormatter( { raw: "MMMM" } ),
globalize.dateFormatter( { raw: "w" } ),
globalize.dateFormatter( { raw: "c" } ),
globalize.dateFormatter( { date: "short" } ),
globalize.dateParser( { date: "short" } ),
globalize.dateFormatter( { date: "long" } ),
globalize.dateParser( { date: "long" } ),
globalize.dateFormatter( { date: "full" } ),
globalize.dateParser( { date: "full" } ),
globalize.numberParser()
]);

return ret;
}, [] );

grunt.file.write( "external/localization.js", globalizeCompiler.compile( formatters ) );
});

grunt.registerTask( "default", [ "lint", "requirejs", "test" ]);
grunt.registerTask( "jenkins", [ "default", "concat" ]);
grunt.registerTask( "lint", [ "asciilint", "jshint", "jscs", "csslint", "htmllint" ]);
Expand Down
1 change: 1 addition & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"qunit-assert-close": "JamesMGreene/qunit-assert-close#v1.1.1",
"qunit-composite": "JamesMGreene/qunit-composite#v1.1.0",
"requirejs": "2.1.14",
"globalize": "globalize#1.1.0-rc.6",

"jquery-1.7.0": "jquery#1.7.0",
"jquery-1.7.1": "jquery#1.7.1",
Expand Down
1 change: 1 addition & 0 deletions build/tasks/testswarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var versions = {
"Accordion": "accordion/accordion.html",
"Autocomplete": "autocomplete/autocomplete.html",
"Button": "button/button.html",
"Calendar": "calendar/calendar.html",
"Core": "core/core.html",
"Datepicker": "datepicker/datepicker.html",
"Dialog": "dialog/dialog.html",
Expand Down
13 changes: 11 additions & 2 deletions demos/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var widgets = [
"accordion",
"autocomplete",
"button",
"calendar",
"checkboxradio",
"controlgroup",
"datepicker",
Expand Down Expand Up @@ -80,12 +81,20 @@ document.documentElement.className = "demo-loading";
require.config( {
baseUrl: window.location.pathname.indexOf( "demos/" ) !== -1 ? "../../ui" : "../../../ui",
paths: {
cldr: "../external/cldrjs/cldr",
"globalize-runtime": "../external/globalize/globalize-runtime",
"globalize-locales": "../external/localization",
jquery: "../external/jquery/jquery",
external: "../external/"
},
map: {
"*": {
"globalize": "globalize-runtime"
}
},
shim: {
"external/globalize/globalize.culture.de-DE": [ "external/globalize/globalize" ],
"external/globalize/globalize.culture.ja-JP": [ "external/globalize/globalize" ]
"external/globalize-old/globalize.culture.de-DE": [ "external/globalize-old/globalize" ],
"external/globalize-old/globalize.culture.ja-JP": [ "external/globalize-old/globalize" ]
}
} );

Expand Down
28 changes: 28 additions & 0 deletions demos/calendar/buttonbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Calendar - Display button bar</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<link rel="stylesheet" href="../demos.css">
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
$( "#calendar" ).calendar({
buttons: {
Today: function() {
$( this ).calendar( "valueAsDate", new Date() );
}
}
});
</script>
</head>
<body>

<div id="calendar"></div>

<div class="demo-description">
<p>Display a button for selecting Today's date with the <code>buttons</code> option.</p>
</div>
</body>
</html>
8 changes: 4 additions & 4 deletions demos/datepicker/inline.html → demos/calendar/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Datepicker - Display inline</title>
<title>jQuery UI Calendar - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<link rel="stylesheet" href="../demos.css">
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
$( "#datepicker" ).datepicker();
$( "#calendar" ).calendar();
</script>
</head>
<body>

Date: <div id="datepicker"></div>
<div id="calendar"></div>

<div class="demo-description">
<p>Display the datepicker embedded in the page instead of in an overlay. Simply call .datepicker() on a div instead of an input.</p>
<p>The calendar is a widget for selecting a date using a visual calendar representation.</p>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Datepicker - Display month &amp; year menus</title>
<title>jQuery UI Calendar - Display month &amp; year menus</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<link rel="stylesheet" href="../demos.css">
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
$( "#datepicker" ).datepicker({
$( "#calendar" ).calendar({
changeMonth: true,
changeYear: true
});
</script>
</head>
<body>

<p>Date: <input type="text" id="datepicker"></p>
<div id="calendar"></div>

<div class="demo-description">
<p>Show month and year dropdowns in place of the static month/year header to facilitate navigation through large timeframes. Add the boolean <code>changeMonth</code> and <code>changeYear</code> options.</p>
Expand Down
22 changes: 22 additions & 0 deletions demos/calendar/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Calendar Demos</title>
</head>
<body>

<ul>
<li><a href="default.html">Default functionality</a></li>
<li><a href="buttonbar.html">Display button bar</a></li>
<li><a href="dropdown-month-year.html">Display month &amp; year menus</a></li>
<li><a href="localization.html">Localize calendar</a></li>
<li><a href="min-max.html">Restrict date range</a></li>
<li><a href="multiple-months.html">Display multiple months</a></li>
<li><a href="other-months.html">Dates in other months</a></li>
<li><a href="show-week.html">Show week of the year</a></li>
</ul>

</body>
</html>
41 changes: 41 additions & 0 deletions demos/calendar/localization.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Calendar - Localize calendar</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<link rel="stylesheet" href="../demos.css">
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
var calendar = $( "#calendar" ),
select = $( "#locale" );

calendar.calendar({
locale: select.val()
});

select.change( function() {
calendar.calendar( "option", {
locale: select.val()
});
calendar.calendar( "valueAsDate", calendar.calendar( "valueAsDate" ) );
});
</script>
</head>
<body>

<div id="calendar"></div>
<select id="locale">
<option value="ar">Arabic</option>
<option value="de" selected>German</option>
<option value="en">English</option>
<option value="es">Spanish</option>
<option value="zh">Chinese Simplified</option>
</select>

<div class="demo-description">
<p>Localize the calendar language and format (English / Western formatting is the default). The calendar includes built-in support for languages that read right-to-left, such as Arabic and Hebrew.</p>
</div>
</body>
</html>
33 changes: 33 additions & 0 deletions demos/calendar/min-max.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Calendar - Restrict date range</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<link rel="stylesheet" href="../demos.css">
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
var now = new Date(),
dateMin = new Date( now.getFullYear(), now.getMonth(), now.getDate() + 1 ),
dateMax = new Date( now.getFullYear(), now.getMonth(), now.getDate() + 8 );

dateMin = new Date( 2008, 2 - 1, 29 );
dateMax = new Date( 2008, 12 - 1, 7 );


$( "#calendar" ).calendar({
min: dateMin,
max: dateMax,
value: new Date( 2008, 1 - 1, 4 )
});
</script>
</head>
<body>

<div id="calendar"></div>

<div class="demo-description">
<p>Restrict the range of selectable dates with the <code>min</code> and <code>max</code> options. Set the beginning and end dates as actual dates (<code>new Date(2009, 1 - 1, 26)</code>).</p>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Datepicker - Display multiple months</title>
<title>jQuery UI Calendar - Display multiple months</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<link rel="stylesheet" href="../demos.css">
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
$( "#datepicker" ).datepicker({
numberOfMonths: 3,
showButtonPanel: true
$( "#calendar" ).calendar({
numberOfMonths: 3
});
</script>
</head>
<body>

<p>Date: <input type="text" id="datepicker"></p>
<div id="calendar"></div>

<div class="demo-description">
<p>Set the <code>numberOfMonths</code> option to an integer of 2 or more to show multiple months in a single datepicker.</p>
<p>Set the <code>numberOfMonths</code> option to an integer of 2 or more to show multiple months in a single calendar.</p>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,28 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Datepicker - Dates in other months</title>
<title>jQuery UI Calendar - Dates in other months</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<link rel="stylesheet" href="../demos.css">
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
$( "#datepicker" ).datepicker({
showOtherMonths: true,
selectOtherMonths: true
$( "#calendar" ).calendar({
eachDay: function( day ) {
if ( day.lead ) {
day.render = true;
day.selectable = true;
day.extraClasses = "ui-priority-secondary";
}
}
});
</script>
</head>
<body>

<p>Date: <input type="text" id="datepicker"></p>
<div id="calendar"></div>

<div class="demo-description">
<p>The datepicker can show dates that come from other than the main month
<p>The calendar can show dates that come from other than the main month
being displayed. These other dates can also be made selectable.</p>
</div>
</body>
Expand Down
26 changes: 26 additions & 0 deletions demos/calendar/show-week.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Calendar - Show week of the year</title>
<link rel="stylesheet" href="../../themes/base/all.css">
<link rel="stylesheet" href="../demos.css">
<script src="../../external/requirejs/require.js"></script>
<script src="../bootstrap.js">
$( "#calendar" ).calendar({
showWeek: true
});
</script>
</head>
<body>

<div id="calendar"></div>

<div class="demo-description">
<p>The calendar can show the week of the year. The calculation follows
<a href="http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table">Unicode CLDR specification</a>.
This means that some days from one year may be placed into weeks 'belonging' to another year.</p>
</div>
</body>
</html>
Loading