Skip to content

Commit aa1e65f

Browse files
committed
remove react-bootstrap dependency
1 parent 521b5db commit aa1e65f

File tree

6 files changed

+11
-16
lines changed

6 files changed

+11
-16
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
"dependencies": {
8383
"babel-runtime": "^5.6.18",
8484
"classnames": "^2.1.2",
85-
"moment": "^2.8.2",
86-
"react-bootstrap": "^0.16.1"
85+
"moment": "^2.8.2"
8786
}
8887
}

src/DateTimeField.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { Component, PropTypes } from "react";
22
import moment from "moment";
3-
import { Glyphicon } from "react-bootstrap";
3+
import classnames from "classnames";
44
import DateTimePicker from "./DateTimePicker.js";
55
import Constants from "./Constants.js";
66

@@ -54,7 +54,7 @@ export default class DateTimeField extends Component {
5454
showDatePicker: this.props.mode !== Constants.MODE_TIME,
5555
showTimePicker: this.props.mode === Constants.MODE_TIME,
5656
inputFormat: this.resolvePropsInputFormat(),
57-
buttonIcon: this.props.mode === Constants.MODE_TIME ? "time" : "calendar",
57+
buttonIcon: this.props.mode === Constants.MODE_TIME ? "glyphicon-time" : "glyphicon-calendar",
5858
widgetStyle: {
5959
display: "block",
6060
position: "absolute",
@@ -375,7 +375,7 @@ export default class DateTimeField extends Component {
375375
<div className={"input-group date " + this.size()} ref="datetimepicker">
376376
<input className="form-control" onChange={this.onChange} type="text" value={this.state.inputValue} {...this.props.inputProps}/>
377377
<span className="input-group-addon" onBlur={this.onBlur} onClick={this.onClick} ref="dtpbutton">
378-
<Glyphicon glyph={this.state.buttonIcon} />
378+
<span className={classnames("glyphicon", this.state.buttonIcon)} />
379379
</span>
380380
</div>
381381
</div>

src/DateTimePicker.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component, PropTypes } from "react";
2-
import { Glyphicon } from "react-bootstrap";
32
import classnames from "classnames";
43
import DateTimePickerDate from "./DateTimePickerDate.js";
54
import DateTimePickerTime from "./DateTimePickerTime.js";
@@ -93,7 +92,7 @@ export default class DateTimePicker extends Component {
9392
return this.props.mode === Constants.MODE_DATETIME ?
9493
(
9594
<li>
96-
<span className="btn picker-switch" style={{width: "100%"}} onClick={this.props.togglePicker}><Glyphicon glyph={this.props.showTimePicker ? "calendar" : "time"} /></span>
95+
<span className="btn picker-switch" style={{width: "100%"}} onClick={this.props.togglePicker}><span className={classnames("glyphicon", this.props.showTimePicker ? "glyphicon-calendar" : "glyphicon-time")} /></span>
9796
</li>
9897
) :
9998
null;

src/DateTimePickerHours.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component, PropTypes } from "react";
2-
import { Glyphicon } from "react-bootstrap";
32
import Constants from "./Constants.js";
43

54
export default class DateTimePickerHours extends Component {
@@ -14,7 +13,7 @@ export default class DateTimePickerHours extends Component {
1413
(
1514
<ul className="list-unstyled">
1615
<li>
17-
<span className="btn picker-switch" style={{width: "100%"}} onClick={this.props.onSwitch}><Glyphicon glyph="time" /></span>
16+
<span className="btn picker-switch" style={{width: "100%"}} onClick={this.props.onSwitch}><span className="glyphicon glyphicon-time" /></span>
1817
</li>
1918
</ul>
2019
) :

src/DateTimePickerMinutes.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component, PropTypes } from "react";
2-
import { Glyphicon } from "react-bootstrap";
32
import Constants from "./Constants.js";
43

54
export default class DateTimePickerMinutes extends Component {
@@ -14,7 +13,7 @@ export default class DateTimePickerMinutes extends Component {
1413
(
1514
<ul className="list-unstyled">
1615
<li>
17-
<span className="btn picker-switch" style={{width: "100%"}} onClick={this.props.onSwitch}><Glyphicon glyph="time" /></span>
16+
<span className="btn picker-switch" style={{width: "100%"}} onClick={this.props.onSwitch}><span className="glyphicon glyphicon-time" /></span>
1817
</li>
1918
</ul>
2019
) :

src/DateTimePickerTime.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component, PropTypes } from "react";
2-
import { Glyphicon } from "react-bootstrap";
32
import DateTimePickerMinutes from "./DateTimePickerMinutes";
43
import DateTimePickerHours from "./DateTimePickerHours";
54
import Constants from "./Constants.js";
@@ -65,11 +64,11 @@ export default class DateTimePickerTime extends Component {
6564
<table className="table-condensed">
6665
<tbody>
6766
<tr>
68-
<td><a className="btn" onClick={this.props.addHour}><Glyphicon glyph="chevron-up" /></a></td>
67+
<td><a className="btn" onClick={this.props.addHour}><span className="glyphicon glyphicon-chevron-up" /></a></td>
6968

7069
<td className="separator"></td>
7170

72-
<td><a className="btn" onClick={this.props.addMinute}><Glyphicon glyph="chevron-up" /></a></td>
71+
<td><a className="btn" onClick={this.props.addMinute}><span className="glyphicon glyphicon-chevron-up" /></a></td>
7372

7473
<td className="separator"></td>
7574
</tr>
@@ -87,11 +86,11 @@ export default class DateTimePickerTime extends Component {
8786
</tr>
8887

8988
<tr>
90-
<td><a className="btn" onClick={this.props.subtractHour}><Glyphicon glyph="chevron-down" /></a></td>
89+
<td><a className="btn" onClick={this.props.subtractHour}><span className="glyphicon glyphicon-chevron-down" /></a></td>
9190

9291
<td className="separator"></td>
9392

94-
<td><a className="btn" onClick={this.props.subtractMinute}><Glyphicon glyph="chevron-down" /></a></td>
93+
<td><a className="btn" onClick={this.props.subtractMinute}><span className="glyphicon glyphicon-chevron-down" /></a></td>
9594

9695
<td className="separator"></td>
9796
</tr>

0 commit comments

Comments
 (0)