Skip to content

Commit 952c807

Browse files
committed
add prettier
1 parent 75efaa7 commit 952c807

File tree

11 files changed

+403
-321
lines changed

11 files changed

+403
-321
lines changed

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
demo/
2+
dist/
3+
node_modules/

CHANGELOG.md

Lines changed: 116 additions & 71 deletions
Large diffs are not rendered by default.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
1111
you may not use this file except in compliance with the License.
1212
You may obtain a copy of the License at
1313

14-
http://www.apache.org/licenses/LICENSE-2.0
14+
http://www.apache.org/licenses/LICENSE-2.0
1515

1616
Unless required by applicable law or agreed to in writing, software
1717
distributed under the License is distributed on an "AS IS" BASIS,

README.md

Lines changed: 37 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,40 @@
44
[![Dependency Status](https://david-dm.org/skratchdot/react-bootstrap-daterangepicker.svg)](https://david-dm.org/skratchdot/react-bootstrap-daterangepicker)
55
[![devDependency Status](https://david-dm.org/skratchdot/react-bootstrap-daterangepicker/dev-status.svg)](https://david-dm.org/skratchdot/react-bootstrap-daterangepicker#info=devDependencies)
66

7-
87
## Description
98

109
A date/time picker for react (using bootstrap). This is a react wrapper around
1110
an existing jQuery/bootstrap library (it is not a pure react port):
1211

1312
[bootstrap-daterangepicker](https://github.com/dangrossman/bootstrap-daterangepicker)
1413

15-
1614
## Getting Started
1715

18-
1) Install the module with: `npm install --save react-bootstrap-daterangepicker`
16+
1. Install the module with: `npm install --save react-bootstrap-daterangepicker`
1917

20-
2) Install the needed peer dependencies: `npm install --save react react-dom jquery create-react-class prop-types`
18+
2. Install the needed peer dependencies: `npm install --save react react-dom jquery create-react-class prop-types`
2119

22-
3) Create your module (you need to use something like browserify to build)
20+
3. Create your module (you need to use something like browserify to build)
2321

2422
```javascript
2523
var React = require('react');
2624
var moment = require('moment');
2725
var DateRangePicker = require('react-bootstrap-daterangepicker');
2826
var someReactComponent = React.createClass({
29-
render: function () {
30-
return (
31-
<DateRangePicker startDate={moment('1/1/2014')} endDate={moment('3/1/2014')}>
32-
<div>Click Me To Open Picker!</div>
33-
</DateRangePicker>
34-
);
35-
}
27+
render: function() {
28+
return (
29+
<DateRangePicker
30+
startDate={moment('1/1/2014')}
31+
endDate={moment('3/1/2014')}
32+
>
33+
<div>Click Me To Open Picker!</div>
34+
</DateRangePicker>
35+
);
36+
}
3637
});
3738
```
3839

39-
4) Include the daterangepicker CSS in your project somewhere. The CSS file is here: [daterangepicker.css](https://raw.githubusercontent.com/skratchdot/react-bootstrap-daterangepicker/master/css/daterangepicker.css) (don't hotlink- download and host your own copy)
40+
4. Include the daterangepicker CSS in your project somewhere. The CSS file is here: [daterangepicker.css](https://raw.githubusercontent.com/skratchdot/react-bootstrap-daterangepicker/master/css/daterangepicker.css) (don't hotlink- download and host your own copy)
4041

4142
```html
4243
<link rel="stylesheet" href="daterangepicker.css" type="text/css" />
@@ -49,7 +50,7 @@ For in depth documentation, see the original
4950

5051
You can pass all the same props as the original plugin:
5152

52-
- **&lt;input&gt;, alwaysShowCalendars, applyClass, autoApply, autoUpdateInput,
53+
* **&lt;input&gt;, alwaysShowCalendars, applyClass, autoApply, autoUpdateInput,
5354
buttonClasses, cancelClass, dateLimit, drops, endDate, isCustomDate,
5455
isInvalidDate, linkedCalendars, locale, maxDate, minDate, opens, parentEl,
5556
ranges, showCustomRangeLabel, showDropdowns, showISOWeekNumbers,
@@ -58,56 +59,51 @@ You can pass all the same props as the original plugin:
5859

5960
You can listen to the following 7 events:
6061

61-
- **onShow**: thrown when the widget is shown
62-
- **onHide**: thrown when the widget is hidden
63-
- **onShowCalendar**: thrown when the calendar is shown
64-
- **onHideCalendar**: thrown when the calendar is hidden
65-
- **onApply**: thrown when the apply button is clicked
66-
- **onCancel**: thrown when the cancel button is clicked
67-
- **onEvent**: thrown when any of the 4 events above are triggered
62+
* **onShow**: thrown when the widget is shown
63+
* **onHide**: thrown when the widget is hidden
64+
* **onShowCalendar**: thrown when the calendar is shown
65+
* **onHideCalendar**: thrown when the calendar is hidden
66+
* **onApply**: thrown when the apply button is clicked
67+
* **onCancel**: thrown when the cancel button is clicked
68+
* **onEvent**: thrown when any of the 4 events above are triggered
6869

6970
All 7 of the events above should take a handler that is passed 2 arguments: **event** and **picker**
7071

7172
#### Example event handler:
7273

7374
```javascript
7475
var someReactComponent = React.createClass({
75-
handleEvent: function (event, picker) {
76-
console.log(picker.startDate);
77-
},
78-
render: function () {
79-
return (
80-
<DateRangePicker onEvent={this.handleEvent} />
81-
);
82-
}
76+
handleEvent: function(event, picker) {
77+
console.log(picker.startDate);
78+
},
79+
render: function() {
80+
return <DateRangePicker onEvent={this.handleEvent} />;
81+
}
8382
});
8483
```
8584

86-
8785
## Release Notes
8886

8987
Release notes can be found in the
9088
[Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/blob/master/CHANGELOG.md).
9189

9290
We will try to release a new version of this project with each new
9391
[React](http://facebook.github.io/react/index.html)
94-
release. We will bump the major version with each React release. If you are using
92+
release. We will bump the major version with each React release. If you are using
9593
a specific version of `react` or `react-bootstrap`, make sure you specify the correct
9694
version of `react-bootstrap-daterangepicker` in your package.json file.
9795

98-
- React 15: react-bootstrap-daterangepicker v3.x.x
99-
- React 14: react-bootstrap-daterangepicker v1.x.x
100-
- React 13: react-bootstrap-daterangepicker v0.x.x
101-
- React 14/15 Experimental: react-bootstrap-daterangepicker v2.x.x (do not use)
102-
96+
* React 15: react-bootstrap-daterangepicker v3.x.x
97+
* React 14: react-bootstrap-daterangepicker v1.x.x
98+
* React 13: react-bootstrap-daterangepicker v0.x.x
99+
* React 14/15 Experimental: react-bootstrap-daterangepicker v2.x.x (do not use)
103100

104101
## Links
105102

106-
- [Source Code](https://github.com/skratchdot/react-bootstrap-daterangepicker)
107-
- [Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/blob/master/CHANGELOG.md)
108-
- [Live Demo](http://projects.skratchdot.com/react-bootstrap-daterangepicker/)
109-
- [Original Plugin](https://github.com/dangrossman/bootstrap-daterangepicker)
110-
103+
* [Source Code](https://github.com/skratchdot/react-bootstrap-daterangepicker)
104+
* [Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/blob/master/CHANGELOG.md)
105+
* [Live Demo](http://projects.skratchdot.com/react-bootstrap-daterangepicker/)
106+
* [Original Plugin](https://github.com/dangrossman/bootstrap-daterangepicker)
111107

112108
## License
113109

lib/get-options.js

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
"use strict";
1+
'use strict';
22
/* generated by gulpfile.js */
33
export default () => {
4-
return [
5-
"<input>",
6-
"alwaysShowCalendars",
7-
"applyClass",
8-
"autoApply",
9-
"autoUpdateInput",
10-
"buttonClasses",
11-
"cancelClass",
12-
"dateLimit",
13-
"drops",
14-
"endDate",
15-
"isCustomDate",
16-
"isInvalidDate",
17-
"linkedCalendars",
18-
"locale",
19-
"maxDate",
20-
"minDate",
21-
"opens",
22-
"parentEl",
23-
"ranges",
24-
"showCustomRangeLabel",
25-
"showDropdowns",
26-
"showISOWeekNumbers",
27-
"showWeekNumbers",
28-
"singleDatePicker",
29-
"startDate",
30-
"template",
31-
"timePicker",
32-
"timePicker24Hour",
33-
"timePickerIncrement",
34-
"timePickerSeconds"
35-
];
36-
};
4+
return [
5+
'<input>',
6+
'alwaysShowCalendars',
7+
'applyClass',
8+
'autoApply',
9+
'autoUpdateInput',
10+
'buttonClasses',
11+
'cancelClass',
12+
'dateLimit',
13+
'drops',
14+
'endDate',
15+
'isCustomDate',
16+
'isInvalidDate',
17+
'linkedCalendars',
18+
'locale',
19+
'maxDate',
20+
'minDate',
21+
'opens',
22+
'parentEl',
23+
'ranges',
24+
'showCustomRangeLabel',
25+
'showDropdowns',
26+
'showISOWeekNumbers',
27+
'showWeekNumbers',
28+
'singleDatePicker',
29+
'startDate',
30+
'template',
31+
'timePicker',
32+
'timePicker24Hour',
33+
'timePickerIncrement',
34+
'timePickerSeconds'
35+
];
36+
};

0 commit comments

Comments
 (0)