jquery-ui-rails 6.0.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. checksums.yaml +5 -5
  2. data/History.md +11 -2
  3. data/README.md +12 -12
  4. data/Rakefile +8 -3
  5. data/VERSIONS.md +2 -0
  6. data/app/assets/images/jquery-ui/ui-icons_444444_256x240.png +0 -0
  7. data/app/assets/images/jquery-ui/ui-icons_555555_256x240.png +0 -0
  8. data/app/assets/images/jquery-ui/ui-icons_777620_256x240.png +0 -0
  9. data/app/assets/images/jquery-ui/ui-icons_777777_256x240.png +0 -0
  10. data/app/assets/images/jquery-ui/ui-icons_cc0000_256x240.png +0 -0
  11. data/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
  12. data/app/assets/javascripts/jquery-ui/data.js +16 -18
  13. data/app/assets/javascripts/jquery-ui/disable-selection.js +10 -7
  14. data/app/assets/javascripts/jquery-ui/effect.js +69 -752
  15. data/app/assets/javascripts/jquery-ui/effects/effect-blind.js +11 -8
  16. data/app/assets/javascripts/jquery-ui/effects/effect-bounce.js +11 -8
  17. data/app/assets/javascripts/jquery-ui/effects/effect-clip.js +11 -8
  18. data/app/assets/javascripts/jquery-ui/effects/effect-drop.js +11 -8
  19. data/app/assets/javascripts/jquery-ui/effects/effect-explode.js +13 -10
  20. data/app/assets/javascripts/jquery-ui/effects/effect-fade.js +11 -8
  21. data/app/assets/javascripts/jquery-ui/effects/effect-fold.js +11 -8
  22. data/app/assets/javascripts/jquery-ui/effects/effect-highlight.js +11 -8
  23. data/app/assets/javascripts/jquery-ui/effects/effect-puff.js +11 -8
  24. data/app/assets/javascripts/jquery-ui/effects/effect-pulsate.js +11 -8
  25. data/app/assets/javascripts/jquery-ui/effects/effect-scale.js +11 -8
  26. data/app/assets/javascripts/jquery-ui/effects/effect-shake.js +11 -8
  27. data/app/assets/javascripts/jquery-ui/effects/effect-size.js +13 -8
  28. data/app/assets/javascripts/jquery-ui/effects/effect-slide.js +11 -8
  29. data/app/assets/javascripts/jquery-ui/effects/effect-transfer.js +12 -9
  30. data/app/assets/javascripts/jquery-ui/focusable.js +13 -20
  31. data/app/assets/javascripts/jquery-ui/form-reset-mixin.js +11 -10
  32. data/app/assets/javascripts/jquery-ui/i18n/datepicker-af.js +8 -5
  33. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar-DZ.js +8 -5
  34. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ar.js +7 -4
  35. data/app/assets/javascripts/jquery-ui/i18n/datepicker-az.js +14 -11
  36. data/app/assets/javascripts/jquery-ui/i18n/datepicker-be.js +14 -11
  37. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bg.js +15 -12
  38. data/app/assets/javascripts/jquery-ui/i18n/datepicker-bs.js +14 -11
  39. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ca.js +12 -9
  40. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cs.js +12 -9
  41. data/app/assets/javascripts/jquery-ui/i18n/datepicker-cy-GB.js +8 -5
  42. data/app/assets/javascripts/jquery-ui/i18n/datepicker-da.js +15 -12
  43. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de-AT.js +41 -0
  44. data/app/assets/javascripts/jquery-ui/i18n/datepicker-de.js +14 -11
  45. data/app/assets/javascripts/jquery-ui/i18n/datepicker-el.js +13 -10
  46. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-AU.js +8 -5
  47. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-GB.js +8 -5
  48. data/app/assets/javascripts/jquery-ui/i18n/datepicker-en-NZ.js +8 -5
  49. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eo.js +14 -11
  50. data/app/assets/javascripts/jquery-ui/i18n/datepicker-es.js +14 -11
  51. data/app/assets/javascripts/jquery-ui/i18n/datepicker-et.js +8 -5
  52. data/app/assets/javascripts/jquery-ui/i18n/datepicker-eu.js +14 -11
  53. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fa.js +8 -5
  54. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fi.js +14 -11
  55. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fo.js +13 -10
  56. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CA.js +5 -2
  57. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr-CH.js +7 -4
  58. data/app/assets/javascripts/jquery-ui/i18n/datepicker-fr.js +6 -3
  59. data/app/assets/javascripts/jquery-ui/i18n/datepicker-gl.js +14 -11
  60. data/app/assets/javascripts/jquery-ui/i18n/datepicker-he.js +14 -11
  61. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hi.js +7 -4
  62. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hr.js +14 -11
  63. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hu.js +9 -6
  64. data/app/assets/javascripts/jquery-ui/i18n/datepicker-hy.js +14 -11
  65. data/app/assets/javascripts/jquery-ui/i18n/datepicker-id.js +16 -12
  66. data/app/assets/javascripts/jquery-ui/i18n/datepicker-is.js +13 -10
  67. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it-CH.js +14 -11
  68. data/app/assets/javascripts/jquery-ui/i18n/datepicker-it.js +14 -11
  69. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ja.js +14 -11
  70. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ka.js +11 -8
  71. data/app/assets/javascripts/jquery-ui/i18n/datepicker-kk.js +14 -11
  72. data/app/assets/javascripts/jquery-ui/i18n/datepicker-km.js +9 -6
  73. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ko.js +12 -9
  74. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ky.js +12 -9
  75. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lb.js +8 -5
  76. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lt.js +13 -10
  77. data/app/assets/javascripts/jquery-ui/i18n/datepicker-lv.js +11 -8
  78. data/app/assets/javascripts/jquery-ui/i18n/datepicker-mk.js +14 -11
  79. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ml.js +8 -5
  80. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ms.js +14 -11
  81. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nb.js +11 -8
  82. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl-BE.js +7 -4
  83. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nl.js +8 -5
  84. data/app/assets/javascripts/jquery-ui/i18n/datepicker-nn.js +11 -8
  85. data/app/assets/javascripts/jquery-ui/i18n/datepicker-no.js +11 -8
  86. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pl.js +14 -11
  87. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt-BR.js +13 -10
  88. data/app/assets/javascripts/jquery-ui/i18n/datepicker-pt.js +12 -9
  89. data/app/assets/javascripts/jquery-ui/i18n/datepicker-rm.js +10 -7
  90. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ro.js +10 -7
  91. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ru.js +14 -11
  92. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sk.js +14 -11
  93. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sl.js +14 -11
  94. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sq.js +14 -11
  95. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr-SR.js +14 -11
  96. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sr.js +14 -11
  97. data/app/assets/javascripts/jquery-ui/i18n/datepicker-sv.js +14 -11
  98. data/app/assets/javascripts/jquery-ui/i18n/datepicker-ta.js +10 -7
  99. data/app/assets/javascripts/jquery-ui/i18n/datepicker-th.js +14 -11
  100. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tj.js +14 -11
  101. data/app/assets/javascripts/jquery-ui/i18n/datepicker-tr.js +14 -11
  102. data/app/assets/javascripts/jquery-ui/i18n/datepicker-uk.js +14 -11
  103. data/app/assets/javascripts/jquery-ui/i18n/datepicker-vi.js +7 -4
  104. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-CN.js +14 -11
  105. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-HK.js +14 -11
  106. data/app/assets/javascripts/jquery-ui/i18n/datepicker-zh-TW.js +15 -12
  107. data/app/assets/javascripts/jquery-ui/jquery-patch.js +58 -0
  108. data/app/assets/javascripts/jquery-ui/jquery-var-for-color.js +24 -0
  109. data/app/assets/javascripts/jquery-ui/keycode.js +11 -7
  110. data/app/assets/javascripts/jquery-ui/labels.js +18 -13
  111. data/app/assets/javascripts/jquery-ui/plugin.js +5 -2
  112. data/app/assets/javascripts/jquery-ui/position.js +30 -17
  113. data/app/assets/javascripts/jquery-ui/scroll-parent.js +10 -7
  114. data/app/assets/javascripts/jquery-ui/tabbable.js +11 -8
  115. data/app/assets/javascripts/jquery-ui/unique-id.js +10 -7
  116. data/app/assets/javascripts/jquery-ui/vendor/jquery-color/jquery.color.js +691 -0
  117. data/app/assets/javascripts/jquery-ui/version.js +6 -3
  118. data/app/assets/javascripts/jquery-ui/widget.js +56 -30
  119. data/app/assets/javascripts/jquery-ui/widgets/accordion.js +32 -23
  120. data/app/assets/javascripts/jquery-ui/widgets/autocomplete.js +31 -74
  121. data/app/assets/javascripts/jquery-ui/widgets/button.js +91 -28
  122. data/app/assets/javascripts/jquery-ui/widgets/checkboxradio.js +27 -24
  123. data/app/assets/javascripts/jquery-ui/widgets/controlgroup.js +15 -11
  124. data/app/assets/javascripts/jquery-ui/widgets/datepicker.js +185 -68
  125. data/app/assets/javascripts/jquery-ui/widgets/dialog.js +57 -54
  126. data/app/assets/javascripts/jquery-ui/widgets/draggable.js +30 -25
  127. data/app/assets/javascripts/jquery-ui/widgets/droppable.js +25 -19
  128. data/app/assets/javascripts/jquery-ui/widgets/menu.js +90 -52
  129. data/app/assets/javascripts/jquery-ui/widgets/mouse.js +36 -40
  130. data/app/assets/javascripts/jquery-ui/widgets/progressbar.js +14 -11
  131. data/app/assets/javascripts/jquery-ui/widgets/resizable.js +116 -42
  132. data/app/assets/javascripts/jquery-ui/widgets/selectable.js +18 -11
  133. data/app/assets/javascripts/jquery-ui/widgets/selectmenu.js +30 -52
  134. data/app/assets/javascripts/jquery-ui/widgets/slider.js +15 -12
  135. data/app/assets/javascripts/jquery-ui/widgets/sortable.js +193 -140
  136. data/app/assets/javascripts/jquery-ui/widgets/spinner.js +28 -45
  137. data/app/assets/javascripts/jquery-ui/widgets/tabs.js +32 -66
  138. data/app/assets/javascripts/jquery-ui/widgets/tooltip.js +38 -36
  139. data/app/assets/javascripts/jquery-ui.js +3 -7
  140. data/app/assets/stylesheets/jquery-ui/accordion.css +5 -5
  141. data/app/assets/stylesheets/jquery-ui/all.css +5 -5
  142. data/app/assets/stylesheets/jquery-ui/autocomplete.css +5 -5
  143. data/app/assets/stylesheets/jquery-ui/base.css +5 -5
  144. data/app/assets/stylesheets/jquery-ui/button.css +6 -11
  145. data/app/assets/stylesheets/jquery-ui/checkboxradio.css +5 -5
  146. data/app/assets/stylesheets/jquery-ui/controlgroup.css +5 -8
  147. data/app/assets/stylesheets/jquery-ui/core.css +5 -9
  148. data/app/assets/stylesheets/jquery-ui/datepicker.css +5 -5
  149. data/app/assets/stylesheets/jquery-ui/dialog.css +5 -5
  150. data/app/assets/stylesheets/jquery-ui/draggable.css +4 -5
  151. data/app/assets/stylesheets/jquery-ui/menu.css +5 -7
  152. data/app/assets/stylesheets/jquery-ui/progressbar.css +5 -6
  153. data/app/assets/stylesheets/jquery-ui/resizable.css +4 -5
  154. data/app/assets/stylesheets/jquery-ui/selectable.css +4 -5
  155. data/app/assets/stylesheets/jquery-ui/selectmenu.css +5 -5
  156. data/app/assets/stylesheets/jquery-ui/slider.css +6 -13
  157. data/app/assets/stylesheets/jquery-ui/sortable.css +4 -5
  158. data/app/assets/stylesheets/jquery-ui/spinner.css +5 -5
  159. data/app/assets/stylesheets/jquery-ui/tabs.css +5 -5
  160. data/app/assets/stylesheets/jquery-ui/theme.css.erb +10 -14
  161. data/app/assets/stylesheets/jquery-ui/tooltip.css +5 -5
  162. data/lib/jquery/ui/rails/version.rb +2 -2
  163. metadata +11 -15
  164. data/app/assets/javascripts/jquery-ui/core.js +0 -15
  165. data/app/assets/javascripts/jquery-ui/escape-selector.js +0 -23
  166. data/app/assets/javascripts/jquery-ui/form.js +0 -22
  167. data/app/assets/javascripts/jquery-ui/ie.js +0 -17
  168. data/app/assets/javascripts/jquery-ui/jquery-1-7.js +0 -91
  169. data/app/assets/javascripts/jquery-ui/safe-active-element.js +0 -42
  170. data/app/assets/javascripts/jquery-ui/safe-blur.js +0 -23
@@ -1,27 +1,28 @@
1
1
  //= require jquery-ui/version
2
2
  //= require jquery-ui/keycode
3
3
 
4
- // jscs:disable maximumLineLength
5
- /* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
4
+ /* eslint-disable max-len, camelcase */
6
5
  /*!
7
- * jQuery UI Datepicker 1.12.1
8
- * http://jqueryui.com
6
+ * jQuery UI Datepicker 1.14.1
7
+ * https://jqueryui.com
9
8
  *
10
- * Copyright jQuery Foundation and other contributors
9
+ * Copyright OpenJS Foundation and other contributors
11
10
  * Released under the MIT license.
12
- * http://jquery.org/license
11
+ * https://jquery.org/license
13
12
  */
14
13
 
15
14
  //>>label: Datepicker
16
15
  //>>group: Widgets
17
16
  //>>description: Displays a calendar from an input or inline for selecting dates.
18
- //>>docs: http://api.jqueryui.com/datepicker/
19
- //>>demos: http://jqueryui.com/datepicker/
17
+ //>>docs: https://api.jqueryui.com/datepicker/
18
+ //>>demos: https://jqueryui.com/datepicker/
20
19
  //>>css.structure: ../../themes/base/core.css
21
20
  //>>css.structure: ../../themes/base/datepicker.css
22
21
  //>>css.theme: ../../themes/base/theme.css
23
22
 
24
23
  ( function( factory ) {
24
+ "use strict";
25
+
25
26
  if ( typeof define === "function" && define.amd ) {
26
27
 
27
28
  // AMD. Register as an anonymous module.
@@ -35,9 +36,10 @@
35
36
  // Browser globals
36
37
  factory( jQuery );
37
38
  }
38
- }( function( $ ) {
39
+ } )( function( $ ) {
40
+ "use strict";
39
41
 
40
- $.extend( $.ui, { datepicker: { version: "1.12.1" } } );
42
+ $.extend( $.ui, { datepicker: { version: "1.14.1" } } );
41
43
 
42
44
  var datepicker_instActive;
43
45
 
@@ -65,6 +67,7 @@ function datepicker_getZindex( elem ) {
65
67
 
66
68
  return 0;
67
69
  }
70
+
68
71
  /* Date picker manager.
69
72
  Use the singleton instance of this class, $.datepicker, to interact with the date picker.
70
73
  Settings for (groups of) date pickers are maintained in an instance object,
@@ -91,18 +94,20 @@ function Datepicker() {
91
94
  prevText: "Prev", // Display text for previous month link
92
95
  nextText: "Next", // Display text for next month link
93
96
  currentText: "Today", // Display text for current month link
94
- monthNames: [ "January","February","March","April","May","June",
95
- "July","August","September","October","November","December" ], // Names of months for drop-down and formatting
97
+ monthNames: [ "January", "February", "March", "April", "May", "June",
98
+ "July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting
96
99
  monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
97
100
  dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
98
101
  dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
99
- dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ], // Column headings for days starting at Sunday
102
+ dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday
100
103
  weekHeader: "Wk", // Column header for week of the year
101
104
  dateFormat: "mm/dd/yy", // See format options on parseDate
102
105
  firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
103
106
  isRTL: false, // True if right-to-left language, false if left-to-right
104
107
  showMonthAfterYear: false, // True if the year select precedes month, false for month then year
105
- yearSuffix: "" // Additional text to append to the year in the month headers
108
+ yearSuffix: "", // Additional text to append to the year in the month headers,
109
+ selectMonthLabel: "Select month", // Invisible label for month selector
110
+ selectYearLabel: "Select year" // Invisible label for year selector
106
111
  };
107
112
  this._defaults = { // Global defaults for all the date picker instances
108
113
  showOn: "focus", // "focus" for popup on focus,
@@ -143,6 +148,7 @@ function Datepicker() {
143
148
  onSelect: null, // Define a callback function when a date is selected
144
149
  onChangeMonthYear: null, // Define a callback function when the month or year is changed
145
150
  onClose: null, // Define a callback function when the datepicker is closed
151
+ onUpdateDatepicker: null, // Define a callback function when the datepicker is updated
146
152
  numberOfMonths: 1, // Number of months to show at a time
147
153
  showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
148
154
  stepMonths: 1, // Number of months to step back/forward
@@ -161,6 +167,7 @@ function Datepicker() {
161
167
  }
162
168
 
163
169
  $.extend( Datepicker.prototype, {
170
+
164
171
  /* Class name added to elements to indicate already configured with a date picker. */
165
172
  markerClassName: "hasDatepicker",
166
173
 
@@ -243,7 +250,9 @@ $.extend( Datepicker.prototype, {
243
250
  inst.append.remove();
244
251
  }
245
252
  if ( appendText ) {
246
- inst.append = $( "<span class='" + this._appendClass + "'>" + appendText + "</span>" );
253
+ inst.append = $( "<span>" )
254
+ .addClass( this._appendClass )
255
+ .text( appendText );
247
256
  input[ isRTL ? "before" : "after" ]( inst.append );
248
257
  }
249
258
 
@@ -260,12 +269,32 @@ $.extend( Datepicker.prototype, {
260
269
  if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked
261
270
  buttonText = this._get( inst, "buttonText" );
262
271
  buttonImage = this._get( inst, "buttonImage" );
263
- inst.trigger = $( this._get( inst, "buttonImageOnly" ) ?
264
- $( "<img/>" ).addClass( this._triggerClass ).
265
- attr( { src: buttonImage, alt: buttonText, title: buttonText } ) :
266
- $( "<button type='button'></button>" ).addClass( this._triggerClass ).
267
- html( !buttonImage ? buttonText : $( "<img/>" ).attr(
268
- { src:buttonImage, alt:buttonText, title:buttonText } ) ) );
272
+
273
+ if ( this._get( inst, "buttonImageOnly" ) ) {
274
+ inst.trigger = $( "<img>" )
275
+ .addClass( this._triggerClass )
276
+ .attr( {
277
+ src: buttonImage,
278
+ alt: buttonText,
279
+ title: buttonText
280
+ } );
281
+ } else {
282
+ inst.trigger = $( "<button type='button'>" )
283
+ .addClass( this._triggerClass );
284
+ if ( buttonImage ) {
285
+ inst.trigger.html(
286
+ $( "<img>" )
287
+ .attr( {
288
+ src: buttonImage,
289
+ alt: buttonText,
290
+ title: buttonText
291
+ } )
292
+ );
293
+ } else {
294
+ inst.trigger.text( buttonText );
295
+ }
296
+ }
297
+
269
298
  input[ isRTL ? "before" : "after" ]( inst.trigger );
270
299
  inst.trigger.on( "click", function() {
271
300
  if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {
@@ -327,7 +356,7 @@ $.extend( Datepicker.prototype, {
327
356
  }
328
357
 
329
358
  // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
330
- // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
359
+ // https://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
331
360
  inst.dpDiv.css( "display", "block" );
332
361
  },
333
362
 
@@ -409,8 +438,10 @@ $.extend( Datepicker.prototype, {
409
438
  $target.removeClass( this.markerClassName ).empty();
410
439
  }
411
440
 
441
+ $.datepicker._hideDatepicker();
412
442
  if ( datepicker_instActive === inst ) {
413
443
  datepicker_instActive = null;
444
+ this._curInst = null;
414
445
  }
415
446
  },
416
447
 
@@ -430,7 +461,9 @@ $.extend( Datepicker.prototype, {
430
461
  if ( nodeName === "input" ) {
431
462
  target.disabled = false;
432
463
  inst.trigger.filter( "button" ).
433
- each( function() { this.disabled = false; } ).end().
464
+ each( function() {
465
+ this.disabled = false;
466
+ } ).end().
434
467
  filter( "img" ).css( { opacity: "1.0", cursor: "" } );
435
468
  } else if ( nodeName === "div" || nodeName === "span" ) {
436
469
  inline = $target.children( "." + this._inlineClass );
@@ -439,7 +472,11 @@ $.extend( Datepicker.prototype, {
439
472
  prop( "disabled", false );
440
473
  }
441
474
  this._disabledInputs = $.map( this._disabledInputs,
442
- function( value ) { return ( value === target ? null : value ); } ); // delete entry
475
+
476
+ // Delete entry
477
+ function( value ) {
478
+ return ( value === target ? null : value );
479
+ } );
443
480
  },
444
481
 
445
482
  /* Disable the date picker to a jQuery selection.
@@ -458,7 +495,9 @@ $.extend( Datepicker.prototype, {
458
495
  if ( nodeName === "input" ) {
459
496
  target.disabled = true;
460
497
  inst.trigger.filter( "button" ).
461
- each( function() { this.disabled = true; } ).end().
498
+ each( function() {
499
+ this.disabled = true;
500
+ } ).end().
462
501
  filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
463
502
  } else if ( nodeName === "div" || nodeName === "span" ) {
464
503
  inline = $target.children( "." + this._inlineClass );
@@ -467,7 +506,11 @@ $.extend( Datepicker.prototype, {
467
506
  prop( "disabled", true );
468
507
  }
469
508
  this._disabledInputs = $.map( this._disabledInputs,
470
- function( value ) { return ( value === target ? null : value ); } ); // delete entry
509
+
510
+ // Delete entry
511
+ function( value ) {
512
+ return ( value === target ? null : value );
513
+ } );
471
514
  this._disabledInputs[ this._disabledInputs.length ] = target;
472
515
  },
473
516
 
@@ -495,8 +538,7 @@ $.extend( Datepicker.prototype, {
495
538
  _getInst: function( target ) {
496
539
  try {
497
540
  return $.data( target, "datepicker" );
498
- }
499
- catch ( err ) {
541
+ } catch ( err ) {
500
542
  throw "Missing instance data for this datepicker";
501
543
  }
502
544
  },
@@ -729,8 +771,7 @@ $.extend( Datepicker.prototype, {
729
771
  $.datepicker._updateAlternate( inst );
730
772
  $.datepicker._updateDatepicker( inst );
731
773
  }
732
- }
733
- catch ( err ) {
774
+ } catch ( err ) {
734
775
  }
735
776
  }
736
777
  return true;
@@ -835,7 +876,8 @@ $.extend( Datepicker.prototype, {
835
876
  numMonths = this._getNumberOfMonths( inst ),
836
877
  cols = numMonths[ 1 ],
837
878
  width = 17,
838
- activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
879
+ activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ),
880
+ onUpdateDatepicker = $.datepicker._get( inst, "onUpdateDatepicker" );
839
881
 
840
882
  if ( activeCell.length > 0 ) {
841
883
  datepicker_handleMouseover.apply( activeCell.get( 0 ) );
@@ -861,18 +903,19 @@ $.extend( Datepicker.prototype, {
861
903
 
862
904
  //assure that inst.yearshtml didn't change.
863
905
  if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
864
- inst.dpDiv.find( "select.ui-datepicker-year:first" ).replaceWith( inst.yearshtml );
906
+ inst.dpDiv.find( "select.ui-datepicker-year" ).first().replaceWith( inst.yearshtml );
865
907
  }
866
908
  origyearshtml = inst.yearshtml = null;
867
909
  }, 0 );
868
910
  }
911
+
912
+ if ( onUpdateDatepicker ) {
913
+ onUpdateDatepicker.apply( ( inst.input ? inst.input[ 0 ] : null ), [ inst ] );
914
+ }
869
915
  },
870
916
 
871
- // #6694 - don't focus the input if it's already focused
872
- // this breaks the change event in IE
873
- // Support: IE and jQuery <1.9
874
917
  _shouldFocusInput: function( inst ) {
875
- return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
918
+ return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" );
876
919
  },
877
920
 
878
921
  /* Check positioning to remain on screen. */
@@ -903,7 +946,7 @@ $.extend( Datepicker.prototype, {
903
946
  inst = this._getInst( obj ),
904
947
  isRTL = this._get( inst, "isRTL" );
905
948
 
906
- while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) {
949
+ while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) {
907
950
  obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
908
951
  }
909
952
 
@@ -929,8 +972,7 @@ $.extend( Datepicker.prototype, {
929
972
  $.datepicker._tidyDialog( inst );
930
973
  };
931
974
 
932
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
933
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
975
+ if ( $.effects && ( $.effects.effect[ showAnim ] ) ) {
934
976
  inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
935
977
  } else {
936
978
  inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :
@@ -991,9 +1033,7 @@ $.extend( Datepicker.prototype, {
991
1033
  if ( this._isDisabledDatepicker( target[ 0 ] ) ) {
992
1034
  return;
993
1035
  }
994
- this._adjustInstDate( inst, offset +
995
- ( period === "M" ? this._get( inst, "showCurrentAtPos" ) : 0 ), // undo positioning
996
- period );
1036
+ this._adjustInstDate( inst, offset, period );
997
1037
  this._updateDatepicker( inst );
998
1038
  },
999
1039
 
@@ -1040,7 +1080,7 @@ $.extend( Datepicker.prototype, {
1040
1080
  }
1041
1081
 
1042
1082
  inst = this._getInst( target[ 0 ] );
1043
- inst.selectedDay = inst.currentDay = $( "a", td ).html();
1083
+ inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) );
1044
1084
  inst.selectedMonth = inst.currentMonth = month;
1045
1085
  inst.selectedYear = inst.currentYear = year;
1046
1086
  this._selectDate( id, this._formatDate( inst,
@@ -1093,7 +1133,7 @@ $.extend( Datepicker.prototype, {
1093
1133
  altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
1094
1134
  date = this._getDate( inst );
1095
1135
  dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
1096
- $( altField ).val( dateStr );
1136
+ $( document ).find( altField ).val( dateStr );
1097
1137
  }
1098
1138
  },
1099
1139
 
@@ -1532,8 +1572,7 @@ $.extend( Datepicker.prototype, {
1532
1572
  try {
1533
1573
  return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
1534
1574
  offset, $.datepicker._getFormatConfig( inst ) );
1535
- }
1536
- catch ( e ) {
1575
+ } catch ( e ) {
1537
1576
 
1538
1577
  // Ignore
1539
1578
  }
@@ -1707,32 +1746,104 @@ $.extend( Datepicker.prototype, {
1707
1746
  this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),
1708
1747
  this._getFormatConfig( inst ) ) );
1709
1748
 
1710
- prev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ?
1711
- "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
1712
- " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" :
1713
- ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" ) );
1749
+ if ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ) {
1750
+ prev = $( "<a>" )
1751
+ .attr( {
1752
+ "class": "ui-datepicker-prev ui-corner-all",
1753
+ "data-handler": "prev",
1754
+ "data-event": "click",
1755
+ title: prevText
1756
+ } )
1757
+ .append(
1758
+ $( "<span>" )
1759
+ .addClass( "ui-icon ui-icon-circle-triangle-" +
1760
+ ( isRTL ? "e" : "w" ) )
1761
+ .text( prevText )
1762
+ )[ 0 ].outerHTML;
1763
+ } else if ( hideIfNoPrevNext ) {
1764
+ prev = "";
1765
+ } else {
1766
+ prev = $( "<a>" )
1767
+ .attr( {
1768
+ "class": "ui-datepicker-prev ui-corner-all ui-state-disabled",
1769
+ title: prevText
1770
+ } )
1771
+ .append(
1772
+ $( "<span>" )
1773
+ .addClass( "ui-icon ui-icon-circle-triangle-" +
1774
+ ( isRTL ? "e" : "w" ) )
1775
+ .text( prevText )
1776
+ )[ 0 ].outerHTML;
1777
+ }
1714
1778
 
1715
1779
  nextText = this._get( inst, "nextText" );
1716
1780
  nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
1717
1781
  this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
1718
1782
  this._getFormatConfig( inst ) ) );
1719
1783
 
1720
- next = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ?
1721
- "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
1722
- " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" :
1723
- ( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" ) );
1784
+ if ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ) {
1785
+ next = $( "<a>" )
1786
+ .attr( {
1787
+ "class": "ui-datepicker-next ui-corner-all",
1788
+ "data-handler": "next",
1789
+ "data-event": "click",
1790
+ title: nextText
1791
+ } )
1792
+ .append(
1793
+ $( "<span>" )
1794
+ .addClass( "ui-icon ui-icon-circle-triangle-" +
1795
+ ( isRTL ? "w" : "e" ) )
1796
+ .text( nextText )
1797
+ )[ 0 ].outerHTML;
1798
+ } else if ( hideIfNoPrevNext ) {
1799
+ next = "";
1800
+ } else {
1801
+ next = $( "<a>" )
1802
+ .attr( {
1803
+ "class": "ui-datepicker-next ui-corner-all ui-state-disabled",
1804
+ title: nextText
1805
+ } )
1806
+ .append(
1807
+ $( "<span>" )
1808
+ .attr( "class", "ui-icon ui-icon-circle-triangle-" +
1809
+ ( isRTL ? "w" : "e" ) )
1810
+ .text( nextText )
1811
+ )[ 0 ].outerHTML;
1812
+ }
1724
1813
 
1725
1814
  currentText = this._get( inst, "currentText" );
1726
1815
  gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today );
1727
1816
  currentText = ( !navigationAsDateFormat ? currentText :
1728
1817
  this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );
1729
1818
 
1730
- controls = ( !inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
1731
- this._get( inst, "closeText" ) + "</button>" : "" );
1732
-
1733
- buttonPanel = ( showButtonPanel ) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + ( isRTL ? controls : "" ) +
1734
- ( this._isInRange( inst, gotoDate ) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
1735
- ">" + currentText + "</button>" : "" ) + ( isRTL ? "" : controls ) + "</div>" : "";
1819
+ controls = "";
1820
+ if ( !inst.inline ) {
1821
+ controls = $( "<button>" )
1822
+ .attr( {
1823
+ type: "button",
1824
+ "class": "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
1825
+ "data-handler": "hide",
1826
+ "data-event": "click"
1827
+ } )
1828
+ .text( this._get( inst, "closeText" ) )[ 0 ].outerHTML;
1829
+ }
1830
+
1831
+ buttonPanel = "";
1832
+ if ( showButtonPanel ) {
1833
+ buttonPanel = $( "<div class='ui-datepicker-buttonpane ui-widget-content'>" )
1834
+ .append( isRTL ? controls : "" )
1835
+ .append( this._isInRange( inst, gotoDate ) ?
1836
+ $( "<button>" )
1837
+ .attr( {
1838
+ type: "button",
1839
+ "class": "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
1840
+ "data-handler": "today",
1841
+ "data-event": "click"
1842
+ } )
1843
+ .text( currentText ) :
1844
+ "" )
1845
+ .append( isRTL ? "" : controls )[ 0 ].outerHTML;
1846
+ }
1736
1847
 
1737
1848
  firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
1738
1849
  firstDay = ( isNaN( firstDay ) ? 0 : firstDay );
@@ -1820,7 +1931,9 @@ $.extend( Datepicker.prototype, {
1820
1931
  ( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) +
1821
1932
  ( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
1822
1933
  ( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
1823
- "' href='#'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
1934
+ "' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader
1935
+ "' data-date='" + printDate.getDate() + // store date as data
1936
+ "'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
1824
1937
  printDate.setDate( printDate.getDate() + 1 );
1825
1938
  printDate = this._daylightSavingAdjust( printDate );
1826
1939
  }
@@ -1850,6 +1963,8 @@ $.extend( Datepicker.prototype, {
1850
1963
  changeMonth = this._get( inst, "changeMonth" ),
1851
1964
  changeYear = this._get( inst, "changeYear" ),
1852
1965
  showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
1966
+ selectMonthLabel = this._get( inst, "selectMonthLabel" ),
1967
+ selectYearLabel = this._get( inst, "selectYearLabel" ),
1853
1968
  html = "<div class='ui-datepicker-title'>",
1854
1969
  monthHtml = "";
1855
1970
 
@@ -1859,7 +1974,7 @@ $.extend( Datepicker.prototype, {
1859
1974
  } else {
1860
1975
  inMinYear = ( minDate && minDate.getFullYear() === drawYear );
1861
1976
  inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
1862
- monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
1977
+ monthHtml += "<select class='ui-datepicker-month' aria-label='" + selectMonthLabel + "' data-handler='selectMonth' data-event='change'>";
1863
1978
  for ( month = 0; month < 12; month++ ) {
1864
1979
  if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
1865
1980
  monthHtml += "<option value='" + month + "'" +
@@ -1894,7 +2009,7 @@ $.extend( Datepicker.prototype, {
1894
2009
  endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
1895
2010
  year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
1896
2011
  endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
1897
- inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
2012
+ inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>";
1898
2013
  for ( ; year <= endYear; year++ ) {
1899
2014
  inst.yearshtml += "<option value='" + year + "'" +
1900
2015
  ( year === drawYear ? " selected='selected'" : "" ) +
@@ -2106,18 +2221,20 @@ $.fn.datepicker = function( options ) {
2106
2221
  apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
2107
2222
  }
2108
2223
  return this.each( function() {
2109
- typeof options === "string" ?
2110
- $.datepicker[ "_" + options + "Datepicker" ].
2111
- apply( $.datepicker, [ this ].concat( otherArgs ) ) :
2224
+ if ( typeof options === "string" ) {
2225
+ $.datepicker[ "_" + options + "Datepicker" ]
2226
+ .apply( $.datepicker, [ this ].concat( otherArgs ) );
2227
+ } else {
2112
2228
  $.datepicker._attachDatepicker( this, options );
2229
+ }
2113
2230
  } );
2114
2231
  };
2115
2232
 
2116
2233
  $.datepicker = new Datepicker(); // singleton instance
2117
2234
  $.datepicker.initialized = false;
2118
2235
  $.datepicker.uuid = new Date().getTime();
2119
- $.datepicker.version = "1.12.1";
2236
+ $.datepicker.version = "1.14.1";
2120
2237
 
2121
2238
  return $.datepicker;
2122
2239
 
2123
- } ) );
2240
+ } );