UNPKG

datatables.net-datetime

Version:

DateTime picker for DataTables.net

46 lines (39 loc) 1.54 kB
<?xml version="1.0" encoding="UTF-8" ?> <dt-option library="DateTime"> <name>disableDays</name> <summary>Specify days that cannot be selected.</summary> <since>DateTime 1.0.0</since> <type type="null"> <description> When this option is `null` any and all of the days of the week can be selected. </description> </type> <type type="number[]"> <description> When this option is an array of numbers, any of the days indexes (0 indexed starting from Sunday) that are present here will not be selectable within the DateTime picker. </description> </type> <type type="function"> <signature>disableDays(day)</signature> <parameter type="number" name="day">The index of the day to check if it is disabled or not.</parameter> <returns type="boolean"/> <description> If this option is a function it should take one parameter, a number representing the index of the day being checked (again, 0 indexed starting from Sunday) if that day should be selectable it returns `true`, otherwise `false`. </description> </type> <default value="null"> As default, all of the days can be selected. </default> <description> <![CDATA[ This option allows for certain days to be unselectable. This is done by either setting this option to an array or function as detailed below. ]]> </description> <example title="Disable selection of Saturdays and Sundays"><![CDATA[ $(document).ready(function () { new DateTime(document.getElementById('test'), { disableDays: [5, 6] }); }); ]]></example> </dt-option>