secondsAvailable
Since: DateTime 1.0.0
Sets which seconds are selectable.
Please note - this property requires the DateTime extension for DataTables.
Description
This option allows the user to restrict which seconds the user is able to select. Any values that are placed within the array are going to be selectable while all others will not.
Types
number[]
- Description:
When this option is an array, any value for the second that is in this array will be selectable and all others will not.
Default
- Value:
null
As default all of the seconds are selectable.
Example
Restrict the user to select either 00, 15, 30 or 45:
$(document).ready(function () {
new DateTime(document.getElementById('test'), {
secondsAvailable: [00, 15, 30, 45]
});
});