datatables.net-datetime
Version:
DateTime picker for DataTables.net
49 lines (33 loc) • 1.13 kB
text/xml
<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="jquery datetime">
<![CDATA[
dayjs.extend(dayjs_plugin_utc);
dayjs.extend(dayjs_plugin_customParseFormat);
$('#test').dtDateTime({
format: 'D/M/YYYY'
});
]]>
</js>
<js-vanilla>
<![CDATA[
dayjs.extend(dayjs_plugin_utc);
dayjs.extend(dayjs_plugin_customParseFormat);
new DateTime(document.getElementById('test'), {
format: 'D/M/YYYY'
});
]]>
</js-vanilla>
<title lib="DateTime">DayJS formatting</title>
<info>< 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="17/1/2022" />
</custom-table>
</dt-example>