Revel
GitHub
GitHub
  • Overview

    • Getting started
    • FAQ
    • Release notes
  • Foundations

    • Meet the standard
    • Accessibility
    • Internationalization
    • Information hierarchy
    • Speed
  • Design

    • Visual principles
    • Colors
    • Space
    • Icons
    • Typography
  • Design tokens
  • Style helpers
  • Content

    • Express your ideas
    • Actionable language
    • Inclusive and accessible language
    • Alternative text
    • Grammar and mechanics
      • Basics
      • Capitalization
      • Dates and units of measurement
      • Punctuation
  • Components

    • Alert
    • Avatar
    • Badge
    • Button
    • Button group
    • Checkbox
    • Date Input
      • dates
      • datetimes
      • ranges
    • Field group
    • File upload
    • Flex
    • Grid
    • Icon
    • Image
    • Input
    • Loader
    • Modal
    • Month picker
    • Pagination
    • Popper
    • Radio
    • Repeater
    • Select
    • Tabs
    • Tile
    • Toast
    • Toggle
  • Directives

    • Click outside
    • Tooltip

Date Input for datetimes

Use r-date-input with datetime type to select datetimes (including time).

Usage

   import { RDateInput } from '@rebilly/revel';

   <r-date-input type="datetime"/>

Examples

date-input-datetime.vue

API

Props

NameTypeDefaultDescription
labelstring''

Label for the date picker

idstring() => nanoid()

Unique id of the date picker

captionstringundefined

A text to describe the date picker

modelValueunion, Date, object, string, null() => new Date()

Used to specify selected dates

disabledbooleanfalse

Disable

validateNullable, ValidationStatenull

Validation result sent by Vuelidate

showValidateMessagesbooleanfalse

Show validation messages

timezonestring'UTC'

Time zone

availableDatesobjectundefined

Available dates

columnsnumber1

Columns

timePickerbooleanfalse

Time picker used by RDateRangeButtonGroup to include time in ranges

placeholderstring''

Time picker

minDateunion, Date, string, objectundefined

Min date

maxDateunion, Date, string, objectundefined

Max date

typestring'date'

Type

is24hrbooleanfalse

Define if the time format is 24H

hideTimeHeaderbooleanfalse

Define if hide the time header

placementstring'bottom'

Placement

localestringundefined

v-calendar uses Internationalization API by default but we can explicitly specify a locale with this prop See https://vcalendar.io/i18n.html#string-locales

masksobject() => ({})

Masks are used to properly format and parse different sections of the calendar and date picker components.

allowEmptyboolean

Whether the value can be null for single date inputs

Events

NameDescription
update:modelValueThe model value updated
Edit this page
Last Updated: 7/19/24, 12:22 PM
Contributors: Alberto Gualis, John Hannagan, Weetbix, Alabi Olasunkanmi
Prev
dates
Next
ranges