|
14 | 14 | * limitations under the License.
|
15 | 15 | */
|
16 | 16 |
|
17 |
| -import React, { Component } from 'react' |
| 17 | +import { Component } from 'react' |
18 | 18 | import 'react-dates/initialize'
|
19 | 19 | import 'react-dates/lib/css/_datepicker.css'
|
20 | 20 | import CustomizableCalendarDay from 'react-dates/esm/components/CustomizableCalendarDay.js'
|
@@ -133,10 +133,10 @@ export class DatePickerType2 extends Component<DatePickerType2Props, any> {
|
133 | 133 | ReactGA.event(DA_APP_DETAILS_GA_EVENTS.MetricsApplyTimeChange)
|
134 | 134 | }
|
135 | 135 |
|
136 |
| - onClickPredefinedTimeRange = (startDate, endDate, endStr) => () => { |
137 |
| - ReactGA.event(DA_APP_DETAILS_GA_EVENTS.MetricsPresetTimeRange) |
138 |
| - this.props.handlePredefinedRange(startDate, endDate, endStr) |
139 |
| - this.setState({ showCalendar: false }) |
| 136 | + onClickPredefinedTimeRange = (startDate: Moment, endDate: Moment, endStr: string) => () => { |
| 137 | + ReactGA.event(DA_APP_DETAILS_GA_EVENTS.MetricsPresetTimeRange) |
| 138 | + this.props.handlePredefinedRange(startDate, endDate, endStr) |
| 139 | + this.setState({ showCalendar: false }) |
140 | 140 | }
|
141 | 141 |
|
142 | 142 | renderDatePresets() {
|
@@ -181,11 +181,7 @@ export class DatePickerType2 extends Component<DatePickerType2Props, any> {
|
181 | 181 | }}
|
182 | 182 | />
|
183 | 183 | </label>
|
184 |
| - <button |
185 |
| - type="button" |
186 |
| - className="cta small" |
187 |
| - onClick={this.onClickApplyTimeChange} |
188 |
| - > |
| 184 | + <button type="button" className="cta small" onClick={this.onClickApplyTimeChange}> |
189 | 185 | Apply Time Range
|
190 | 186 | </button>
|
191 | 187 | </div>
|
|
0 commit comments