
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@viclen/vue-month-event-calendar
Advanced tools
Npm: https://www.npmjs.com/package/@viclen/vue-month-event-calendar
Npm: https://www.npmjs.com/package/@viclen/vue-month-event-calendar
GitHub: https://github.com/viclen/vue-month-event-calendar
// npm
npm i @viclen/vue-month-event-calendar --save
// yarn
yarn add @viclen/vue-month-event-calendar
<template>
<div id="app">
<event-calendar :events="eventList" />
</div>
</template>
<script>
export default {
name: "app",
components: {
},
data() {
return {
eventList: [
{
date: new Date(2019,11,12,10,10,10),
title: "First event",
desc: "We can set date as a date object or as a string, like the next one."
},
{
date: "2019-12-25 10:00",
title: "Christmas",
desc: "An annual festival commemorating the birth of Jesus Christ... (<a href='https://en.wikipedia.org/wiki/Christmas'>Wikipedia</a>)"
},
{
date: new Date(2019,11,10,10,10,0),
title: "HTML Description",
desc: "I can create <a href=''>links</a> within the <b>description</b>."
}
]
};
}
};
</script>
You may choose the language of the calendar by changing the :language property. The current available languages are en and pt.
If your language is none of the above, or you just want to change which words are displayed, there is also the :translation property. You may create your own translation to what appears to the calendar.
See code below. All available options are there.
<event-calendar :events="eventList" :language="'pt'" :translation="translation" />
<script>
export default {
data() {
return {
translation: {
noEvent: "No events today.",
months: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
weekDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
event: "Event", // singular
events: "Events", // plural
day: "Day",
}
}
}
}
You may also change the main color of the calendar.
To customize the color, you may just write them into the :color property as a string. See the code for more.
<event-calendar :events="eventList" :color="'normal'" />
<event-calendar :events="eventList" :color="'blue'" />
<event-calendar :events="eventList" :color="'black'" />
<event-calendar :events="eventList" :color="'red'" />
<event-calendar :events="eventList" :color="'green'" />
For each event shown in the calendar, there is an '×' button for deleting that event.
If you don't want events to be deletable, use the :showDelete property:
<event-calendar :showDelete="false" />
If you want to make it possible to delete an event, you shoud inform the onDeleteEvent property.
The parameters of that function are:
<event-calendar :onDeleteEvent="(e, callback) => myDeleteFunction(e, callback)" />
<script>
export default {
methods: {
// the event (e) here is exactly the same from the events array.
myDeleteFunction(e, callback){
// do some async requests
axios.get('/delete').then(() => {
// if the event was successfully deleted and the callback exists
if(eventDeleted && callback){
// executes the callback
callback();
}
});
}
}
}
</script>
FAQs
Npm: https://www.npmjs.com/package/@viclen/vue-month-event-calendar
We found that @viclen/vue-month-event-calendar 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 researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.