Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

enten/cyclejs-calendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# cyclejs-calendar

Calendar component for Cycle.js

Install

npm install cyclejs-calendar --save

Demo live preview

Usage

import Cycle from '@cycle/core';
import {div, makeDOMDriver} from '@cycle/dom';
import {Observable} from 'rx';
import Calendar from 'cyclejs-calendar';

function main({DOM}) {
  const calendarProps$ = Observable.of({
    year: 1998, month: 6
  });

  const calendar = Calendar({DOM, props$: calendarProps$});

  return {
    DOM: Observable.combineLatest(calendar.DOM, calendar.value$,
      (calendarVTree, value) => {
        return div([
          div(value ? value.toString() : 'Pick a date'),
          calendarVTree
        ]);
      })
  };
}

Cycle.run(main, {
  DOM: makeDOMDriver('#main-container')
});

License

MIT

About

Calendar component for Cycle.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published