New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-renderless-calendar

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-renderless-calendar

Zero dependency Vue renderless calendar with scoped-slots API

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-99.04%
Maintainers
1
Weekly downloads
 
Created
Source

vue-renderless-calendar 📆

Zero dependency Vue renderless calendar with scoped-slots API

Install

npm i vue-renderless-calendar
yarn add vue-renderless-calendar

Locale

import enLocale from 'vue-renderless-calendar/dist/locale/en';

Available locales

  • English locale/en
  • Russian locale/ru

RenderlessCalendar

Main wrapper component which contains state of the calendar and other helpful data

Props

PropRequiredTypeDefaultDescription
viewModefalseString'single', 'double', 'infinite'
modefalseString'single', 'range'
localetrueObjectLocale object containing months, days properties
minDatefalseString''Minimal valid date (YYYY-MM-DDD)
maxDatefalseString''Maximal valid date (YYYY-MM-DDD)
preventOutOfRangefalseBooleantruePrevent user go out of valid dates range
dateSelectStrategyfalseFunctionnullIf you want custom behaviour for handling date select, you can implement this function
defaultSelectedDatesfalseArray[]Array of date strings with YYYY-MM-DDD format
captureHoverfalseBooleantruecaptureHover prop is used for computing dates which are between selected date and current hovered date
captureThirdDatefalseBooleanfalsecaptureThirdDate prop is used for capturing dates between in case when 2 dates already selected and you have third element hovered
disabledDatesfalseArray[]Array of YYYY-MM-DDD strings containing dates that can't be selected
markedDatesfalseArray[]Array of YYYY-MM-DDD strings with special meaning, that later will be accessed via isMarked modifier

Scoped-slots properties

PropertyTypeDescription
weekDayNamesArrayList of week days with short and full titles from locale object
monthNamesArrayList of months with short and full titles from locale object
monthsListArrayList of months which can be used for rendering months with possibility for changing current month view of calendar using setMonth method
calendarArrayArray of months with month, year number and array of dates
selectedDatesArray<CalendarDate>Array of current selected dates
currentMonthNumber
currentYearNumber
canGoToPrevMonthBoolean
canGoToNextMonthBoolean

Scoped-slots Methods

PropertyArgumentsDescription
prevPage-Go to previous view iteration
nextPage-Go to next view iteration
resetDates-Set selectedDates to []
setMonthmonthListItemUpdate views current active month
onDateMouseOut-Reset current hovered date
onDateMouseOverCalendarDateSet current hovered date
onDateSelectCalendarDateAppend selected date to selectedDates array using "date select strategy"
getModifiersCalendarDateReturns

Events

Event namePayload
onDateChangeArray<CalendarDate>

Modifiers

Object containing boolean properties that can be useful for computing styles

PropertyTypeDescription
isSelectedBoolean
isBetweenBoolean
isDisabledBoolean
isMarkedBoolean
isFirstBooleanis first selected date
isLastBooleanis last selected date
isOneDayAfterBooleanis one day after selected date
isOneDayBeforeBooleanis one date before selected date
isOneDayBeforeFirstBoolean
isOneDayAfterFirstBoolean
isOneDayBeforeLastBoolean
isOneDayAfterLastBoolean

CalendarDate

Class representing information about date

Properties

PropertyTypeDescription
yearNumber
monthNumber0-11
dayNumber1-31
actualMonthNumberNumberNumber of month with index correction
formattedStringYYYY-MM-DD
isWeekendBoolean
isTodayBoolean
isOtherMonthDayBooleanThis field can be used to find out that this is the date from previous or next month

Keywords

FAQs

Package last updated on 16 Feb 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc