here is the js i did and load fine, I tried to add as custom JS section of the X-Cart 5, in this particular js date piker, the calendar is just form of display for actual text entry, all data input is processed and transferred to the server as text input, so should work, the issue i have is that I'm getting error from x-cart 5 that the link / script.src = / the javascript source file should be allowed in the X-Cart settings file / authorized. I dont have idea how to do that without getting errors after every next new update.
The attribute ID=93 is the existing text filed attribute ID and using javascript DOM we can replace the current front end display with the javascript date picker, the data input is text by nature so it will be pass and displayed by the server in back side as is done now
Code:
var script = document.createElement('script');
script.src = "https://cdnjs.cloudflare.com/ajax/libs/pickadate.js/3.5.6/compressed/picker.js";
script.onload = function () {
$(document).ready(function () {
$('textarea[data-attribute-id="93"]').datepicker();
}); console.log("script loaded")
};
document.head.appendChild(script);
Do you have any idea if that can be make to work?
Thanks !!