alwaysVisible
Makes the date picker always display.
Please note - this property requires the DateTime extension for DataTables.
Description
This option provides the ability to have the date picker always displayed in the document, rather than as a popover only when the host input
element gains focus. This can be useful for some forms where you want the picker to be immediately available for use. It will display "inline" (i.e. with relative positioning, rather than absolute positioning), thus taking up more space, but allowing it to be part of the flow of the elements around it.
If you don't wish to have a text input at all, and just show the picker, you can use type="hidden"
for the host input
.
Type
boolean
When this option is false
, the standard behaviour of the date picker displaying only when the input
element gains focus applies. If set to true
, the date picker will immediately be inserted into the DOM (after the input
) on initialisation, and continue to be displayed, even once a date has been selected.
Default
- Value:
false
The date picker will show as a popover when the input
gains focus.
Example
Display the date picker inline, always:
$(document).ready(function () {
new DateTime(document.getElementById('test'), {
alwaysVisible: true
});
});