npm install cycle-calendar
cycle-calendar
requires the following props:
value
: Initial date valuestart
: Day the calendar week starts on (Sunday == 0)monthNames
: An array of names for monthsdayNames
: An array of names for days
const calendar = Calendar({
DOM,
props: xs.of({
value: new Date(),
start: 1,
monthNames: ['January', 'February', 'March', 'April', …],
dayNames: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
})
.remember()
})
return {
DOM: xs.combine(calendar.DOM, calendar.value)
.map(([vdom, value]) =>
div([
vdom,
div(`Selected: ${value.toString()}`)
])
)
}
npm run dev
make lib
Outputs transpiled js files to lib
.
make dist
Outputs browserified and minified files to dist
.