Skip to content
On this page

Datetimepicker

An input with a simple dropdown/modal for selecting a date and time, uses native datetimepicker for mobile

Examples

Base

Selected: Thu Sep 21 2023 13:06:38 GMT+0000 (Coordinated Universal Time)

Show code

Inline

Show code
Show code

Min/Max Datetime

Show code

Class props

'Classes applied to the element'
How does the Class props inspector work?
Class propDescriptionPropsSuffixes
datepickerWrapperClassClass of the Datepicker wrapper.
timepickerWrapperClassClass of the Timepicker wrapper.

Datetimepicker component

html
<o-datetimepicker></o-datetimepicker>

Props

Prop nameDescriptionTypeValuesDefault
appendToBodyboolean-
autocompleteNative options to use in HTML5 validationstring-
datepickerobject-
datetimeCreatorfunc-Default function (see source code)
datetimeFormatterfunc-
datetimeParserfunc-
disabledboolean-
editableboolean-false
expandedMakes input full width when inside a grouped or addon fieldboolean-
iconIcon name to be addedstring-
iconPackIcon pack to usestringmdi, fa, fas and any other custom icon pack
iconRightstring-
iconRightClickableboolean-
inlineboolean-
localestring|array-
From config:
{
   locale: undefined
}
maxDatetimedate-
maxlengthSame as native maxlength, plus character counternumber|string-
minDatetimedate-
mobileNativeboolean-true
modelValuedate-
openOnFocusboolean-
overrideboolean-
placeholderstring-
positionstring-
roundedMakes the element roundedboolean-
sizestring-
statusIconShow status icon using field and variant propboolean-
From config:
{
   "statusIcon": true
}
timepickerobject-
useHtml5ValidationEnable html 5 native validationboolean-
From config:
{
   "useHtml5Validation": true
}
validationMessageThe message which is shown when a validation error occursstring-

Events

Event namePropertiesDescription
active-change
icon-right-click
change-month
change-year
blur
focus
invalid
update:modelValue

Slots

NameDescriptionBindings
footer

Sass variables

Current theme ➜ Oruga Base

SASS VariableDefault

See ➜ 📄 Full scss file

Current theme ➜ Oruga Full

SASS VariableDefault

See ➜ 📄 Full scss file

Current theme ➜ Bulma

The theme does not have any custom variables for this component.

Current theme ➜ Bootstrap

The theme does not have any custom variables for this component.

Released under the MIT License.