https://github.com/hanford/react-sherlock
react input with nlp superpowers
https://github.com/hanford/react-sherlock
date module nlp package react
Last synced: 22 days ago
JSON representation
react input with nlp superpowers
- Host: GitHub
- URL: https://github.com/hanford/react-sherlock
- Owner: hanford
- Created: 2016-11-11T22:35:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-01T20:24:41.000Z (almost 8 years ago)
- Last Synced: 2025-03-22T15:50:04.376Z (about 1 month ago)
- Topics: date, module, nlp, package, react
- Language: JavaScript
- Size: 61.5 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-sherlock
> Date input with NLP super powers
## Install
```
$ npm install --save react-sherlock
```## Usage
```js
import Sherlock from 'react-sherlock'..
render () {
console.log(`start date: ${date}`)}
onEndDate={(date) => console.log(`end date: ${date}`)}
/>
}
```Dead simple API - just pass two functions in, and get dates back. All other props will land directly on the `` so you can manipulate/style the input however you need
##### onStartDate fn -> Date Object
When sherlock finds a `start` date, it will call this function with the corresponding date object.##### onEndDate fn -> Date Object
When sherlock finds a `end` date, it will call this function with the corresponding date object.## License
MIT © [Jack Hanford](http://jackhanford.com)