Example 4 — Date Picker (Using Modules)

4X also includes the ability to load modules to extend its core functionality. No special format or syntax is needed to do this; any valid JavaScript can be loaded as a module. However, one of the benefits of using modules is that shared modules need only be loaded once, no matter how many other modules depend on that shared module to function properly.

The standard script tag can be used to load modules into 4X. This does, however, require that shared modules be loaded in the correct order.

All available modules that can be loaded using the standard script tag are located in the folder: "4X/Standard".

Whenever a module requires another shared module to be loaded in advance, these dependencies are documented at the top of the relevant module file for easy referencing.

Example 4 — Coding Sandbox

Using standard modules to import the Datepicker module into 4X.