📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
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

vue scoped-slots calendar

1.1.1
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

WIP: vue-renderless-calendar 📆

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';

Components

RenderlessCalendar

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

Scoped-slots properties

PropertyTypeArgumentsDescription
weekDayNamesArray
monthNamesArray
monthsListArray
calendarArray<CalendarDate>
selectedDatesArray
currentMonthNumber
currentYearNumber
isBetweenBoolean
canGoToPrevMonthFunction
canGoToNexMonthFunction

Scoped-slots Methods

PropertyTypeArgumentsDescription
prevPageFunctionGo to previous view iteration
nextPageFunctionGo to next view iteration
resetDatesFunctionSet selectedDates to []
setMonthFunctionmonthListItemUpdate views current active month
onDateMouseOutFunctionReset current hovered date
onDateMouseOverFunctionCalendarDateSet current hovered date
onDateSelectFunctionCalendarDateAppend selected date to selectedDates array using "date select strategy"

Events

Event namePayload
onDateChangeArray<CalendarDate>

RenderlessDate

FAQs

Package last updated on 17 Jun 2019

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