In frontend I've managed to add a form that loads in a modal shown after a product is added to cart. On that form a field must have a calendar on. I've used the attribute data-mage-init='{"calendar": {"showTime": false, "showOn":"both", "defaultDate":"-20y"}}'
on the form field.
But on the console I see
"NetworkError: 404 Not Found –
http://testmagento2/pub/static/frontend/Magento/luma/en_US/calendar.js"
.
Indeed in that location there is no calendar.js. Instead I've found the calendar.js under http://testmagento2/pub/static/frontend/Magento/luma/en_US/mage/calendar.js
I can't figure out the problem.
Any help is appreciated! Thank you in advance!
Best Answer
ok... so the last idea I came up with was to include the following script inside .phtml file, and not use the data-mage-init attribute anymore: