Socket
Socket
Sign inDemoInstall

vue-drumroll-datetime-picker

Package Overview
Dependencies
25
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-drumroll-datetime-picker

`vue-drumroll-datetime-picker` はスクロールで操作可能なドラム式デートタイムピッカーです。 日付のみ、時刻のみのピッカーもあります。


Version published
Weekly downloads
233
increased by16.5%
Maintainers
1
Install size
7.10 MB
Created
Weekly downloads
 

Readme

Source

Simple design and lightweight wheel style datetime picker

vue-drumroll-datetime-picker is a wheel style datetime picker. There is also a date-only and time-only picker.

There is a fixed format and a dialog format that can be installed directly on the screen, and it also supports responsive support. It is an easy-to-use and highly flexible library with plenty of customization such as date order and label editing. Furthermore, the file size is as light as 50kb or less.

日本語

Demo page

here

Getting started

Install

yarn add vue-drumroll-datetime-picker

or

npm install vue-drumroll-datetime-picker

Global usage

import { createApp } from 'vue'
import DateTimePicker from 'vue-drumroll-datetime-picker'
import 'vue-drumroll-datetime-picker/dist/style.css'

const app = createApp()
app.use(DateTimePicker)

Local usage

<script>
import { DateTimePicker, DatePicker, TimePicker } from 'vue-drumroll-datetime-picker'
import 'vue-drumroll-datetime-picker/style.css'

export default {
  components: {
    DateTimePicker,
    DatePicker,
    TimePicker,
  },
  // ...your code
}
</script>

or

<script setup>
import { DateTimePicker, DatePicker, TimePicker } from 'vue-drumroll-datetime-picker'
import 'vue-drumroll-datetime-picker/style.css'
</script>

API references

Props

DateTimePicker
nametypedefaultdescription
dateOrderArray['year', 'month', 'date']Order of the date picker
dialogBooleanfalseOpen picker in dialog
dragSensitivity[String, Number]1.7Drag sensitivity
formatString"YYYY-MM-DD HH:mm"Date format
height[String, Number]"10em"Specifies the height of the picker
hideOverlayBooleanfalseHide the dialog display overlay. Valid only if dialog is true
hideButtonBooleanfalseHide the dialog close button. Valid only if dialog is true
localeStringundefinedLocale of picker
maxDate[String, Number, Date]value + 100 yearsMaximum valid date and time
minDate[String, Number, Date]1900-01-01 00:00Valid minimum date and time
minuteInterval[String, Number]1Selectable minute intervals for Time picker
modelValue[String, Number, Date]requiredValue of datetime
patternObjectundefinedCustomize picker labels
More details below
scrollSensitivity[String, Number]1.0Scroll sensitivity
touchSensitivity[String, Number]1.7Touch operation sensitivity
type["datetime", "date", "time"]"datetime"Picker type. Select from 3 types: datetime / date / time
DatePicker
nametypedefaultdescription
dateOrderArray['year', 'month', 'date']Order of the date drums
dialogBooleanfalseOpen picker in dialog
dragSensitivity[String, Number]1.7Drag sensitivity
formatString"YYYY-MM-DD HH:mm"Date format
height[String, Number]"10em"Specifies the height of the picker
hideOverlayBooleanfalseHide the dialog display overlay. Valid only if dialog is true
hideButtonBooleanfalseHide the dialog close button. Valid only if dialog is true
localeStringundefinedLocale of picker
maxDate[String, Number, Date]value + 100 yearsMaximum valid date and time
minDate[String, Number, Date]1900-01-01 00:00Valid minimum date and time
modelValue[String, Number, Date]requiredValue of date
patternObjectundefinedCustomize picker labels
More details below
scrollSensitivity[String, Number]1.0Scroll sensitivity
touchSensitivity[String, Number]1.7Touch operation sensitivity
TimePicker
nametypedefaultdescription
dialogBooleanfalseOpen picker in dialog
dragSensitivity[String, Number]1.7Drag sensitivity
formatString"HH:mm"Time format
height[String, Number]"10em"Specifies the height of the picker
hideOverlayBooleanfalseHide the dialog display overlay. Valid only if dialog is true
hideButtonBooleanfalseHide the dialog close button. Valid only if dialog is true
localeStringundefinedLocale of picker
minuteInterval[String, Number]1Selectable minute intervals
modelValue[String, Number, Date]requiredValue of time
patternObjectundefinedCustomize picker labels
More details below
scrollSensitivity[String, Number]1.0Scroll sensitivity
touchSensitivity[String, Number]1.7Touch operation sensitivity

Props: "pattern" detail

"pattern" props are used to customize the labels displayed in the picker. This allows you to add additional information to the picker such as day of the week and AM / PM.

Complete example
{
  year: "YYYY",
  month: "MMM", // -> Jan
  date: "DD(ddd)", // -> 08(Tue)
  hour: "A hh", // -> PM 9
  minute: "mm",
  dividerDate: "/", // -> 2022/Jan/08(Tue)
  dividerTime: "@", // -> PM 9@15
}

Keywords

FAQs

Last updated on 30 Jan 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc