nodep-date-input-polyfill icon indicating copy to clipboard operation
nodep-date-input-polyfill copied to clipboard

When loaded as AMD module, it's triggered everywhere

Open massic80 opened this issue 7 years ago • 0 comments

Hi all, I am working on a project based on requireJS and I'm trying to load NDIP only when a date input is present in page. if(document.querySelector("input[type='date']")!==null) require(["libs/nodep-date-input-polyfill.dist"]); The problem is: the polyfill is triggered whichever browser I use, duplicating the native behavior. No problem if I hardcode the script in my page, prior the removal of ('function'==typeof define&&define.amd?define(b): which would trigger a requirejs error). Firefox would show the native interface, IE11 would show the polyfill. Can you reproduce this problem?

massic80 avatar Feb 21 '18 11:02 massic80