Basic example
Input with a modal for selecting a date and time.
Hey there 👋 we want to make TW elements a community-driven project. It's open source and free, and we would like it to stay that way. If you enjoy it, help the project grow by sharing it with your peers. Every share counts, thank you!
Inline version
You can use inline version with option data-te-inline
.
Disabled
Use data-te-disabled="true"
attribute on Datetimepicker to
remove pointer events.
Add the disabled boolean attribute on an input with
bg-neutral-100
and dark:bg-neutral-700
classes to
give it a neutraled out appearance and remove pointer events and make it
unusable and un-clickable.
Disable past
Use data-te-disable-past="true"
attribute to disallow selecting
past dates.
Disable future
Use data-te-disable-future="true"
attribute to disallow
selecting future dates.
Default values
You can set default date and time with options defaultDate
and
defaultTime
.
Input toggle
Add data-te-date-timepicker-toggle-ref
to the input element to
enable toggling on input click. It is also possible to set
toggleButton
option to false
to remove the toggle
button.
Custom date and time options
Use datepicker
or timepicker
option to set custom
options from our
Datepicker
and
Timepicker
components.