| Server IP : 51.91.236.255 / Your IP : 216.73.216.180 Web Server : Apache System : Linux webm002.cluster129.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : laureet ( 1012854) PHP Version : 8.0.30 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/l/a/u/laureet/www/wp-content/plugins/kirki/kirki-packages/control-date/src/ |
Upload File : |
import "./control.scss";
wp.customize.controlConstructor['kirki-date'] = wp.customize.kirkiDynamicControl.extend({
handleWidth: (input) => {
var styleTag = document.querySelector('#kirki-style-datepicker');
styleTag.innerHTML = '.kirki-datepicker-popup {width: ' + input.clientWidth.toString() + 'px;}';
},
initKirkiControl: function (control) {
var selector;
control = control || this;
selector = control.selector + ' input.datepicker';
var styleTag = document.querySelector('#kirki-style-datepicker');
if (!styleTag) {
styleTag = document.createElement('style');
styleTag.id = 'kirki-style-datepicker';
document.head.appendChild(styleTag);
}
// Init the datepicker.
jQuery(selector).datepicker({
dateFormat: 'yy-mm-dd',
duration: 200,
beforeShow: function (input, inst) {
inst.dpDiv[0].classList.add('kirki-datepicker-popup');
control.handleWidth(input);
}
});
// Save the changes
this.container.on('change keyup paste', 'input.datepicker', function () {
control.setting.set(jQuery(this).val());
});
}
});