Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-vanilla-datetime-picker

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-vanilla-datetime-picker

[![Build Status](https://travis-ci.org/Shchepotin/vue-vanilla-datetime-picker.svg?branch=master)](https://travis-ci.org/Shchepotin/vue-vanilla-datetime-picker)

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Vue Datetime Picker

Build Status

Fast, powerful and easy to use component datetime picker for VueJS. The component includes localization, highlight and disable date, 12/24-hour time, inline mode, etc.

Demo

See demo here

vue-datetime-picker

Requirements

  • Vue.js ^2.5.0

Usage

npm install vue-vanilla-datetime-picker --save
import DateTimePicker from 'vue-vanilla-datetime-picker';

Vue.component('date-time-picker', DateTimePicker);
@import "node_modules/vue-vanilla-datetime-picker/dist/DateTimePicker"

Props:

NameRequiredTypeDefaultDescription
v-model, value*String, Date, DateTime (luxon)Value
value-formatStringyyyy-LL-dd HH:mm:ssValue format
max-dateString, Date, DateTime (luxon)nullMax date
min-dateString, Date, DateTime (luxon)nullMin date
constraints-formatStringyyyy-LL-ddConstraints format
localeStringenSet locale.
inlineBooleanfalseEnable inline mode.
disabledBooleanfalseDisable datetime picker.
formatStringyyyy-LL-dd HH:mmDisplay format.
time-pickerBooleantrueShow time picker.
hour-timeNumber24Hour in 12/24-hour time. Values: '12', '24'.
no-toggle-time-pickerBooleanfalseNo toggle time picker button.
only-time-pickerBooleanfalseShow only time picker.
start-from-sundayBooleanfalseSet Sunday as first day of week.
minute-stepNumber1Set step for minute.
seconds-pickerBooleanfalseShow second picker.
initial-viewStringdaysInitial view: 'days', 'months', 'years'
initial-view-dateString, Date, DateTime (luxon)daysInitial date view
main-button-classStringClass for main button.
disabled-datesArray[]Array of disabled dates.
highlightedArray[]Array of highlighted dates. Example: [{ date: '2018-09-17', class: 'highlighted' }]
auto-closeBooleanfalseClose date picker after select date.
clear-buttonBooleanfalseShow "Clear" button.
close-buttonBooleanfalseShow "Close" button.
today-buttonBooleanfalseShow "Today" button.
value-typeStringAutoSet value type. Types: 'Auto', 'String', 'Date', 'Luxon'.
empty-valueAny''Set empty value for clear button.

Slots:

NameDescription
choose-dateFor main button if date not selected.
formatted-datetimeFor main button if date selected.
dateFor date button.
timeFor time button.
months-prevFor previous month button.
months-nextFor next month button.
years-prevFor previous year button.
years-nextFor next year button.
decades-prevFor previous decade button.
decades-prevFor next decade button.
hours-upFor hours up button.
hours-downFor hours down button.
minutes-upFor minutes up button.
minutes-downFor minutes down button.
seconds-upFor seconds up button.
seconds-downFor seconds down button.
meridiems-upFor meridiems up button.
meridiems-downFor meridiems down button.
clearFor clear button.
closeFor close button.
todayFor today button.

Events:

Name
close
open
change-month
change-year
change-decade

Methods:

NameDescription
openOpen datetime picker
closeClose datetime picker

What about RTL support?

If you need an RTL version of component for your project, recommend use PostCSS plugin which is called postcss-rtl.

Development

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build-lib

Keywords

FAQs

Package last updated on 11 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc