Skip to content

Commit

Permalink
Merge pull request #3 from zigomir/range
Browse files Browse the repository at this point in the history
Range selection
  • Loading branch information
zigomir authored Mar 1, 2020
2 parents b349cc8 + c7a8048 commit 6f4bb22
Show file tree
Hide file tree
Showing 11 changed files with 449 additions and 246 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "caly",
"version": "0.2.0",
"version": "0.3.2",
"description": "Caly is a small calendar!",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand All @@ -22,7 +22,7 @@
"generate": "stencil generate"
},
"devDependencies": {
"@stencil/core": "^1.8.9",
"@stencil/core": "^1.8.11",
"@types/jest": "24.0.25",
"@types/puppeteer": "1.20.3",
"cntdys": "^0.3.2",
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# caly

> 6k calendar
> 7k calendar with range selection 📅
## usage example on codepen

https://codepen.io/zigomir/pen/LYVpJGa?editors=1010
- [caly](https://codepen.io/zigomir/pen/LYVpJGa?editors=1000)
- [caly with range selection](https://codepen.io/zigomir/pen/mdJwXOB?editors=1000)

## docs

see [caly-calendar component](./src/components/caly-calendar/readme.md)

## todo

- customizable day names?
- range selection? -> another component
- customizable day names
40 changes: 40 additions & 0 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@ export namespace Components {
*/
'month': number;
/**
* (optional) Number of months rendered
*/
'numberOfMonths': number;
/**
* (optional) Range
*/
'range': boolean;
/**
* (optional) Range end (dd-mm-yyyy)
*/
'rangeEnd': string;
/**
* (optional) Range start (dd-mm-yyyy)
*/
'rangeStart': string;
/**
* (optional) Selected day (dd-mm-yyyy)
*/
'selected': string;
Expand Down Expand Up @@ -58,10 +74,34 @@ declare namespace LocalJSX {
*/
'month': number;
/**
* (optional) Number of months rendered
*/
'numberOfMonths'?: number;
/**
* (optional) Event to listen for when new day is selected.
*/
'onDaySelected'?: (event: CustomEvent<any>) => void;
/**
* (optional) Event to listen for when range end day is selected.
*/
'onRangeEndSelected'?: (event: CustomEvent<any>) => void;
/**
* (optional) Event to listen for when range start day is selected.
*/
'onRangeStartSelected'?: (event: CustomEvent<any>) => void;
/**
* (optional) Range
*/
'range'?: boolean;
/**
* (optional) Range end (dd-mm-yyyy)
*/
'rangeEnd'?: string;
/**
* (optional) Range start (dd-mm-yyyy)
*/
'rangeStart'?: string;
/**
* (optional) Selected day (dd-mm-yyyy)
*/
'selected'?: string;
Expand Down
Loading

0 comments on commit 6f4bb22

Please sign in to comment.