All Projects → icehaunter → vue3-datepicker

icehaunter / vue3-datepicker

Licence: MIT license
Simple datepicker component for Vue 3

Programming Languages

Vue
7211 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to vue3-datepicker

ak-vue3
组件库包含了 AutoForm 自动表单、BackTop 返回顶部、Breadcrumb 面包屑、 Button 按钮、Cascader 级联选择器、Checkbox 多选框、Collapse 折叠面板、ColorPicker 颜色选择器、DataPicker 时间选择器、Dialog 弹层对话框、Alert 弹框、Echarts 图形图表、Form 表单、Input 输入框、Lazy 图片延时加载、Loading 加载等待、Menu 菜单、Pagination 分页、Progress 进度条、Radio 单选框、Select 选择器、Steps 步骤条、Swiper 图片轮播、Switch 开关、Table 表格、Tabs 标签页、Textarea 文本框、Tooltip 提示、Tr…
Stars: ✭ 24 (-74.19%)
Mutual labels:  datepicker, vue3
vuejs3-datepicker
vue 3 datepicker. supports disabling, highlighting of dates and programmatic access of date.
Stars: ✭ 23 (-75.27%)
Mutual labels:  datepicker, vue3
vue3-date-time-picker
Datepicker component for Vue 3
Stars: ✭ 157 (+68.82%)
Mutual labels:  datepicker, vue3
vue3-analysis
vue3源码解释😃
Stars: ✭ 120 (+29.03%)
Mutual labels:  vue3
vue-split-carousel
a carousel component for vue, meanwhile display several carousel item
Stars: ✭ 37 (-60.22%)
Mutual labels:  vue3
admin-antd-vue
Vue3.x + Ant Design Admin template (vite/webpack)
Stars: ✭ 111 (+19.35%)
Mutual labels:  vue3
vite2-vue3-admin
Vite2 + Vue3.0 + ant-design 2.x
Stars: ✭ 28 (-69.89%)
Mutual labels:  vue3
vite-vue3-starter
⭐ A Vite 2.x + Vue 3.x + TypeScript template starter
Stars: ✭ 384 (+312.9%)
Mutual labels:  vue3
WheelPicker
A wheel picker for Android, support DateWheelPicker, TimeWheelPicker(滚轮控件,日期、时间选择器,省市区三级联动)
Stars: ✭ 33 (-64.52%)
Mutual labels:  datepicker
sonic-client-web
🎉Front end of Sonic cloud real machine testing platform. Sonic云真机测试平台前端。
Stars: ✭ 512 (+450.54%)
Mutual labels:  vue3
vite-primevue-starter
VUE 3 Starter project for using primevue 3 with Vite 2 - Pages, Layouts, Validation
Stars: ✭ 37 (-60.22%)
Mutual labels:  vue3
admin-next
😇 The next generation of mx-space admin dashboard built with Vue 3 and TypeScript.
Stars: ✭ 71 (-23.66%)
Mutual labels:  vue3
XPopupExt
XPopup扩展功能库,基于XPopup强大的弹窗能力和PickerView的选择器逻辑,封装了时间选择器弹窗、城市选择器弹窗和条件选择器。
Stars: ✭ 248 (+166.67%)
Mutual labels:  datepicker
ionic-vue-mobile-template-03
Hybrid app template built with vue, ionic and capacitor.
Stars: ✭ 62 (-33.33%)
Mutual labels:  vue3
templates
tsParticles website templates collection
Stars: ✭ 42 (-54.84%)
Mutual labels:  vue3
react-native-daterange-picker
A React Native component for picking date ranges or single dates.
Stars: ✭ 86 (-7.53%)
Mutual labels:  datepicker
vue-magnify
vue-magnify / vue放大镜组件
Stars: ✭ 14 (-84.95%)
Mutual labels:  vue3
react-native-datepicker-modal
React Native DatePicker Modal Component for iOS/Android
Stars: ✭ 48 (-48.39%)
Mutual labels:  datepicker
vue-antd-admin
基于vue3.0 + vue-cli4.0 + vue-router4.x + vuex4.x + ant-design-vue2.x开发的后台管理系统模板,包含权限路由、权限按钮、流程配置、个人中心等基础功能
Stars: ✭ 57 (-38.71%)
Mutual labels:  vue3
vite-svg
Use SVG files as Vue components with Vite
Stars: ✭ 98 (+5.38%)
Mutual labels:  vue3

Vue 3 Datepicker

Documentation: https://icehaunter.github.io/vue3-datepicker/

This is a basic (at least for now) reimplementation of https://github.com/icehaunter/vuejs-datepicker in Vue 3 and with greatly cleaned up code.

All date manipulation and formatting are done via the amazing date-fns library, so it's a direct dependency of this picker.

Installation

Package is available on NPM: https://www.npmjs.com/package/vue3-datepicker

npm i vue3-datepicker

The component is packaged mainly for use with bundlers, if you require a browser build - post an issue.

Usage

For more examples see https://icehaunter.github.io/vue3-datepicker/examples.html

<template>
  <datepicker
    v-model="selected"
    :locale="locale"
    :upperLimit="to"
    :lowerLimit="from"
    :clearable="true"
  />
</template>

Props and attributes

Attribute fallthrough is enabled, so any attribute you apply to the component will be passed down to the input.

All props which accept formatting strings for dates use date-fns formatting function under the hood, so see that function's documentation for patterns.

Main interaction to date selection is done via v-model with Date as expected type of the value passed.

Full props documentation is available at https://icehaunter.github.io/vue3-datepicker/config.html#props

ID Type Default Description
upperLimit Date Upper limit for available dates for picking
lowerLimit Date Lower limit for available dates for picking
disabledDates { dates: Date[] } Dates not available for picking
disabledTime { dates: Date[] } Dates not available for time picking
startingView 'time' | 'day' | 'month' | 'year' 'day' View on which the date picker should open. Can be either year, month, or day
minimumView 'time' | 'day' | 'month' | 'year' 'day' If set, lower-level views won't show
monthHeadingFormat String LLLL yyyy date-fns-type formatting for a month view heading
weekdayFormat String EE date-fns-type formatting for a line of weekdays on day view
inputFormat String yyyy-MM-dd date-fns-type format in which the string in the input should be both parsed and displayed
locale Locale date-fns/locale/en date-fns locale object. Used in string formatting (see default monthHeadingFormat)
disabled Boolean false Disables datepicker and prevents it's opening
typeable Boolean false Allows user to input date manually
weekStartsOn Number 1 Day on which the week should start. Number from 0 to 6, where 0 is Sunday and 6 is Saturday. Week starts with a Monday (1) by default
clearable Boolean false Allows clearing the selected date and setting the value to null

Compatibility

Package is transpiled and should be usable for everyone with ES6 and above, but the styling of the datepicker itself uses CSS Grid and CSS variables.

Example

<template>
  <datepicker v-model="picked" />
</template>


<script>
import Datepicker from '../src/datepicker/Datepicker.vue'
components: {
  Datepicker
},
data(): {
  return {
    picked: new Date();
  }
}
</script>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].