UNPKG

datatables.net-datetime

Version:

DateTime picker for DataTables.net

36 lines (24 loc) 962 B
<?xml version="1.0" encoding="UTF-8" ?> <dt-example table-type="html" table-class="display nowrap" order="9"> <css lib="datetime"/> <js lib="//cdnjs.cloudflare.com/ajax/libs/dayjs/1.11.5/dayjs.min.js"/> <js lib="//cdnjs.cloudflare.com/ajax/libs/dayjs/1.11.5/plugin/utc.js"/> <js lib="//cdnjs.cloudflare.com/ajax/libs/dayjs/1.11.5/plugin/customParseFormat.min.js"/> <js lib="datatables datetime"> <![CDATA[ dayjs.extend(dayjs_plugin_utc); dayjs.extend(dayjs_plugin_customParseFormat); new DateTime(document.getElementById('test'), { format: 'D/M/YYYY' }); ]]> </js> <title lib="DateTime">DayJS formatting</title> <info><![CDATA[ This example shows the date / time input with [DayJS](https://github.com/iamkun/dayjs) used to provide the date / time formatting. Please note that you also need the DayJS `UTC` and `customParseFormat` plug-ins. ]]></info> <custom-table> <input id="test" type="text" value="30/1/2026" /> </custom-table> </dt-example>