Gathering detailed insights and metrics for vue3-datepicker
Gathering detailed insights and metrics for vue3-datepicker
Gathering detailed insights and metrics for vue3-datepicker
Gathering detailed insights and metrics for vue3-datepicker
npm install vue3-datepicker
v0.4.0 - Fixed style injection
Published on 10 Jun 2023
v0.3.8 - `typeable` fix
Published on 04 Jun 2023
v0.3.7 - Enhancements & events
Published on 04 Jun 2023
v0.3.6 - Bundling fixes
Published on 04 Jun 2023
v0.3.5 - Bug fixes & features
Published on 10 Oct 2022
0.3.4 - Bug fixes
Published on 13 May 2022
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
150 Stars
127 Commits
154 Forks
9 Watching
3 Branches
17 Contributors
Updated on 19 Sept 2024
Minified
Minified + Gzipped
Vue (95.32%)
TypeScript (3.13%)
HTML (0.79%)
CSS (0.48%)
JavaScript (0.29%)
Cumulative downloads
Total Downloads
Last day
-3.5%
4,871
Compared to previous day
Last week
10.2%
26,531
Compared to previous week
Last month
20.8%
104,899
Compared to previous month
Last year
47.8%
1,048,998
Compared to previous year
1
1
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.
Package is available on NPM: https://www.npmjs.com/package/vue3-datepicker
1npm i vue3-datepicker
The component is packaged mainly for use with bundlers, if you require a browser build - post an issue.
For more examples see https://icehaunter.github.io/vue3-datepicker/examples.html
1<template> 2 <datepicker 3 v-model="selected" 4 :locale="locale" 5 :upperLimit="to" 6 :lowerLimit="from" 7 :clearable="true" 8 /> 9</template>
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 | |
startingViewDate | Date | () => new Date() | Date on which to focus when empty datepicker is opened. Default is "right now" |
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 |
dayPickerHeadingFormat | String | LLLL yyyy | date-fns -type formatting for a day view heading |
dayFormat | String | dd | date-fns -type formatting for each day on the day view |
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 dayPickerHeadingFormat ) |
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 |
allowOutsideInterval | Boolean | false | Allows user to click dates outside of current interval |
opened
: Emitted every time the popup opens, including on field focusclosed
: Emitted every time the popup closes, including on field blurdecadePageChanged
: Emitted when a page is changed on the year picker view, displaying a different decade. Has a date that is included in the shown decade as an argument.yearPageChanged
: Emitted when a page is changed on the month picker view, displaying a different year. Has a date that is included in the shown year as an argument.monthPageChanged
: Emitted when a page is changed on the day picker view, displaying a different month. Has a date that is included in the shown month as an argument.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.
1<template> 2 <datepicker v-model="picked" /> 3</template> 4 5<script> 6import Datepicker from '../src/datepicker/Datepicker.vue' 7components: { 8 Datepicker 9}, 10data(): { 11 return { 12 picked: new Date(); 13 } 14} 15</script>
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 4/23 approved changesets -- score normalized to 1
Reason
9 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More