Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

code42day-calendar

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code42day-calendar

Calendar component

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

NPM version Build Status Dependency Status

Calendar

Calendar UI component designed for use as a date-picker, full-sized calendar or anything in-between.

javascript calendar component

Live demo is here

Installation

$ nom install --save code42day-calendar

Example

var Calendar = require('code42day-calendar');
var cal = new Calendar;
cal.el.appendTo('body');

Events

  • view change (date, action) when the viewed month/year is changed without modification of the selected date. This can be done either by next/prev buttons or dropdown menu. The action will be "prev", "next", "month" or "year" depending on what action caused the view to change.
  • change (date) when the selected date is modified

API

new Calendar(date)

Initialize a new Calendar with the given date shown, defaulting to now.

Calendar#select(date)

Select the given date (Date object).

Calendar#show(date)

Show the given date. This does not select the given date, it simply ensures that it is visible in the current view.

Calendar#showMonthSelect()

Add month selection input.

Calendar#showYearSelect([from], [to])

Add year selection input, with optional range specified by from and to, which default to the current year -10 / +10.

Calendar#prev()

Show the previous view (month).

Calendar#next()

Show the next view (month).

Calendar#min()

Define earliest valid date - calendar won't generate change events for dates before this one.

Calendar#max()

Define latest valid date - calendar won't generate change events for dates after this one.

Calendar#locale(locales)

Set alternative locale:

  • locales - Optional. A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the locales argument, see the Intl page.

For browsers which do not support Intl in not available only English locale is supported.

Themes

Aurora:

License

MIT

Keywords

FAQs

Package last updated on 03 Feb 2017

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