# xdsoft DateTimePicker (bundled)

- **Library:** jQuery DateTimePicker 2.5.20, https://xdsoft.net/jqplugins/datetimepicker/ (npm `jquery-datetimepicker@2.5.20`)
- **Licence:** MIT, see `MIT-LICENSE.txt`
- **Also contains:** php-date-formatter 1.3.4 (Kartik Visweswaran) and jQuery Mousewheel 3.1.13 (jQuery Foundation, MIT), as bundled by upstream's `full` build

## Files

| File | What it is |
|---|---|
| `jquery.datetimepicker.full.js` | Readable source: upstream `build/jquery.datetimepicker.full.js` with the changes below |
| `jquery.datetimepicker.full.min.js` | The file the plugin loads: upstream minified build with the same changes |
| `jquery.datetimepicker.min.css` | Upstream stylesheet, unmodified |
| `xdsoft-dark.css` | Dark theme written for this plugin |

## Changes from upstream (since plugin v3.1)

Made so the picker works on jQuery 4, which removes several utilities the library uses, and raises no jQuery Migrate warnings on jQuery 3.

| Upstream | Replaced with | Count |
|---|---|---|
| `$.isFunction(x)` | local `xdIsFunction(x)` (`typeof x === 'function'`) | 15 |
| `$.isArray(x)` | local `xdIsArray(x)` (`Array.isArray`) | 10 |
| `$.trim(x)` | local `xdTrim(x)` (`String(x).trim()`, empty string for null) | 5 |
| `$.type(x) === 'string'` | local `xdIsString(x)` | 3 |
| `.focus()` and `.select().focus()` | `.trigger('focus')` and `.trigger('select').trigger('focus')` | 2 |
| `.bind('mousewheel', fn)` and `.unbind('mousewheel', fn)` | `.on(...)` and `.off(...)` | 2 |

No behaviour is intended to change. The helpers are declared at the top of `datetimepickerFactory` and are not global.
