Skip to content
On this page

NcDatetimePicker

Props

Prop nameDescriptionTypeValuesDefault
clearableboolean-false
minuteStepnumber-10
typestring-'date'
formatstring-null
formatterobject-null
valueThe value to initialize, but also two-way bind the selected date. The date is – like the Date object in
JavaScript – tied to UTC. The selected time zone does not have an influence of the selected time and date
value. You have to translate the time yourself when you want to factor in time zones.
func-() => new Date()
timezoneIdThe preselected IANA time zone ID for the time zone picker, only relevant in combination with :show-timezone-select="true". Example: Europe/Berlin. The prop supports two-way binding through the .sync modifier.string-'UTC'
showTimezoneSelectboolean-false
highlightTimezoneboolean-false
appendToBodyboolean-false
showWeekNumberboolean-false
placeholderstring-null

Events

Event namePropertiesDescription
update:value
update:timezone-id

Slots

NameDescriptionBindings
slot

We're wrapping the awesome datepicker library here https://github.com/mengxiong10/vue2-datepicker Please check there for all the available options.

Defaults

  • cleareable: false
  • minute-step: 10

Example

loading...

Example with confirm button

loading...

Range picker

loading...

Time zone aware date picker

The datepicker can optionally include a picker for the preferred time zone. The selected time does not factor in the picked time zone, but you will have to convert it yourself when necessary.

loading...