Socket
Book a DemoInstallSign in
Socket

hyperdom-calendar

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperdom-calendar

calendar component for hyperdom js

1.1.3
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Hyperdom Calendar

A simple calender for Hyperdom

alt text

Install

npm

npm i hyperdom-calendar -S

Usage

Make sure you add calendar.min.css to your styles.

var h = require('hyperdom').html
var calendar = require('hyperdom-calendar')

function render(model) {
  model.contactCalendar = {}
  return calendar(contactCalendar)
}

API

a Hyperdom model object is required for this component to work. The component will bind these properties to model.chosenObject

// returns todays date as date object
model.chosenObject.today
// returns selected date as date object , initially set to todays date
model.chosenObject.selected.date
// returns selected month as a digit
model.chosenObject.selected.month()
// returns next month from selected month as a digit
model.chosenObject.selected.nextMonth()
// returns prev month from selected month as a digit
model.chosenObject.selected.prevMonth()
// set day for current month current month, returns date object for that day
model.chosenObject.selected.setDay(day)
// returns month as a string
model.chosenObject.selected.monthString()
// returns day for selected date
model.chosenObject.selected.day()
// returns year for selected date
model.chosenObject.selected.year()

Keywords

hyperdom

FAQs

Package last updated on 10 May 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.