Issue #3255504 by anagomes, Chi, cilefen: Remove jQuery dependency from date.js
parent
aa3434c4aa
commit
2b1f1431ca
|
@ -3,7 +3,7 @@
|
||||||
* Polyfill for HTML5 date input.
|
* Polyfill for HTML5 date input.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function ($, Modernizr, Drupal, once) {
|
(function (Modernizr, Drupal, once) {
|
||||||
/**
|
/**
|
||||||
* Attach datepicker fallback on date elements.
|
* Attach datepicker fallback on date elements.
|
||||||
*
|
*
|
||||||
|
@ -151,4 +151,4 @@
|
||||||
`<div class="no-native-datepicker-help">
|
`<div class="no-native-datepicker-help">
|
||||||
<span id="${dateId}">${dateDesc}</span> <span id="${timeId}">${timeDesc}</span>
|
<span id="${dateId}">${dateDesc}</span> <span id="${timeId}">${timeDesc}</span>
|
||||||
</div>`;
|
</div>`;
|
||||||
})(jQuery, Modernizr, Drupal, once);
|
})(Modernizr, Drupal, once);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* @preserve
|
* @preserve
|
||||||
**/
|
**/
|
||||||
|
|
||||||
(function ($, Modernizr, Drupal, once) {
|
(function (Modernizr, Drupal, once) {
|
||||||
Drupal.behaviors.date = {
|
Drupal.behaviors.date = {
|
||||||
attach(context, settings) {
|
attach(context, settings) {
|
||||||
if (Modernizr.inputtypes.date === false) {
|
if (Modernizr.inputtypes.date === false) {
|
||||||
|
@ -76,4 +76,4 @@
|
||||||
}) => `<div class="no-native-datepicker-help">
|
}) => `<div class="no-native-datepicker-help">
|
||||||
<span id="${dateId}">${dateDesc}</span> <span id="${timeId}">${timeDesc}</span>
|
<span id="${dateId}">${dateDesc}</span> <span id="${timeId}">${timeDesc}</span>
|
||||||
</div>`;
|
</div>`;
|
||||||
})(jQuery, Modernizr, Drupal, once);
|
})(Modernizr, Drupal, once);
|
Loading…
Reference in New Issue