timepicker-ui
4.6.0GitHub
timepicker-ui
Basic Examples / Inline Calendar

Inline Calendar

Render the calendar permanently inside a page container with @pglejzer/datepicker-ui.

Inline

#

ui.inline.enabled renders the calendar into ui.inline.container, a selector or an element, instead of opening it. The input still holds the value. An inline picker has no footer by default, so it commits only through behavior.commitOnChange or behavior.closeOnSelect.

index.html
<input id="date" />
<div id="calendar"></div>
Inline
import DatepickerUI from "@pglejzer/datepicker-ui";
import "@pglejzer/datepicker-ui/index.css";
new DatepickerUI("#date", {
ui: { inline: { enabled: true, container: "#calendar" } },
behavior: { commitOnChange: true },
}).create();
#

ui.footer: true shows the footer in inline mode. The user then confirms with the OK button and the picker commits nothing before that, so commitOnChange is not needed.

Inline footer
import DatepickerUI from "@pglejzer/datepicker-ui";
import "@pglejzer/datepicker-ui/index.css";
new DatepickerUI("#date", {
ui: { inline: { enabled: true, container: "#calendar" }, footer: true },
}).create();

Docs: Display Modes · Layouts

Esc