Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
vue-calendar-picker
Advanced tools
Calendar component
Same browser support as Vue.js 2
<template>
<calendar></calendar>
</template>
<script>
import {calendar} from 'vue-calendar'
export default {
components: {
calendar: calendar
}
}
</script>
npm install --save vue-calendar-picker
vue-calendar-picker
has 3 available components:
calendar.vue
: simple calendarcalendarEvents.vue
: calendar.vue
+ one-time events and date/time periodscalendarRange.vue
: calendarEvents.vue
+ range selectioncalendar.vue
The locale of the calendar. Impacts the days names, month names and first day ofthe week. supported locale list. Locale name must be uppercase.
Enable compact mode. Use less UI space.
Initial view zoom.
Initial view date.
Called for each calendar cell. The retun valus is used as className of the cell.
eventObject
has the following properties:
'down'
: mousedown or touchstart'up'
: mouseup or touchend'tap'
: click'press'
: dblclick or longtap'over'
: mouseover or touchmoveIndicates that the pointer is active: a mouse button is down or the finger touches the screen.
Indicates that the shift or ctrl or alt or meta key is down. Always false
on touch-screen devices.
{ start: Date, end: Date }
The date range of the item
The range name: 'minute'
, 'hour'
, 'day'
, 'week'
, 'month'
, 'year'
.
The content of calendar cells.
itemRange
{ start: Date, end: Date }
The time range of the the cell.
layout
stringThe layout of the content, either 'horizontal'
or 'vertical'
.
vue-calendar-picker can by styled easily, all css selectors are prefixed with .calendar
.
.calendar {
border: 2px solid #000;
border-radius: 0.5em;
padding: 0.5em;
}
calendarEvents.vue
{ color: CSS color, start: Date, end: Date }
A list of one-time events and date/time periods to display in the calendar.
One-time events has the same start
and end
date.
{ start: Date, end: Date }
The current calendar selection. For display only.
eventObject
has the same properties that calendar.vue added:
{ start: Date, end: Date }
A reference to the calendarEvent
related to the mouse/touch event otherwise undefined.
calendarRange.vue
Allow user selection. The selection
property object is modified according to the user's selection.
false
Display two calendars side-by-side to make selection easier.
eventObject
has the same properties that calendar.vue.
<template>
<calendar-range :events="calendarEvents" :selection="calendarSelection"></calendar-range>
</template>
<script>
import {calendarRange} from 'vue-calendar'
export default {
components: {
calendarRange: calendarRange
},
data() {
return {
calendarEvents: [
// periods
{ color:'#aaf', start: new Date(2016, 9, 5, 0,0,0,0), end: new Date(2017, 4, 15, 0,0,0,0) },
{ color:'#afa', start: new Date(2016, 9, 5, 0,0,0,0), end: new Date(2017, 4, 13, 0,0,0,0) },
{ color:'#faa', start: new Date(2017, 4, 8, 12,30, 0,0), end: new Date(2017, 4, 9, 6,30, 0,0) },
// one-time
{ color:'#faa', start: new Date(2017, 4, 2, 0,0,0,0), end: new Date(2017, 4, 2, 0,0,0,0) },
{ color:'#aaa', start: new Date(2017, 4, 2, 0,0,0,0), end: new Date(2017, 4, 2, 0,0,0,0) },
],
calendarSelection: {
start: new Date(2017, 4, 2), end: new Date(2017, 4, 7, 12)
}
}
}
}
</script>
FAQs
calendar component
The npm package vue-calendar-picker receives a total of 4 weekly downloads. As such, vue-calendar-picker popularity was classified as not popular.
We found that vue-calendar-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.