| 1 |
( function( $ ) { |
| 2 |
'use strict'; |
| 3 |
jQuery( function() { |
| 4 |
// eslint-disable-next-line no-var |
| 5 |
$( '.order-date.date-picker-backendorder' ).on( 'change', function() { |
| 6 |
const m = this.value.split( '-' ); |
| 7 |
[ 'aa', 'mm', 'jj' ].forEach( function( v, k ) { |
| 8 |
$( 'input[name="' + v + '"]' ).val( m[ k ] ); |
| 9 |
} ); |
| 10 |
} ).datepicker( { |
| 11 |
dateFormat: 'yy-mm-dd', |
| 12 |
numberOfMonths: 1, |
| 13 |
showButtonPanel: true, |
| 14 |
select() { |
| 15 |
console.log( arguments ); |
| 16 |
}, |
| 17 |
} ); |
| 18 |
} ); |
| 19 |
}( jQuery ) ); |
| 20 |
|