@@ -4,12 +4,14 @@ import moment from 'moment'
4
4
import CustomBarGraph from './Grapths/CustomBarGraph'
5
5
import CustomLineChart from './Grapths/CustomLineChart'
6
6
import CustomBadgeRow from './Grapths/CustomBadgeRow'
7
+ import DatePicker from 'react-datepicker'
7
8
import 'react-datepicker/dist/react-datepicker.css'
8
9
import GluuLoader from '../Apps/Gluu/GluuLoader'
9
10
import GluuViewWrapper from '../Apps/Gluu/GluuViewWrapper'
10
11
import { getMau } from '../../redux/actions/MauActions'
11
12
import { getClients } from '../../redux/actions/InitActions'
12
13
import applicationstyle from '../Apps/Gluu/styles/applicationstyle'
14
+ import GluuLabel from '../Apps/Gluu/GluuLabel'
13
15
import GluuRibbon from '../Apps/Gluu/GluuRibbon'
14
16
import {
15
17
Button ,
@@ -18,6 +20,7 @@ import {
18
20
CardBody ,
19
21
FormGroup ,
20
22
Col ,
23
+ Row ,
21
24
} from '../../../app/components'
22
25
import {
23
26
hasBoth ,
@@ -147,6 +150,49 @@ function DashboardPage({ statData, permissions, clients, loading, dispatch }) {
147
150
< FormGroup row />
148
151
< FormGroup row />
149
152
< CardBody >
153
+ < Row >
154
+ < Col sm = { 2 } > </ Col >
155
+ < Col sm = { 10 } >
156
+ < GluuLabel label = "Select a date range" size = "4" />
157
+ < DatePicker
158
+ selected = { startDate }
159
+ onChange = { ( date ) => setStartDate ( date ) }
160
+ selectsStart
161
+ isClearable
162
+ startDate = { startDate }
163
+ dateFormat = "MM/yyyy"
164
+ showMonthYearPicker
165
+ endDate = { endDate }
166
+ customInput = { < CustomButton /> }
167
+ />
168
+
169
+ < DatePicker
170
+ selected = { endDate }
171
+ onChange = { ( date ) => setEndDate ( date ) }
172
+ selectsEnd
173
+ isClearable
174
+ startDate = { startDate }
175
+ endDate = { endDate }
176
+ dateFormat = "MM/yyyy"
177
+ showMonthYearPicker
178
+ minDate = { startDate }
179
+ maxDate = { new Date ( ) }
180
+ customInput = { < CustomButton /> }
181
+ />
182
+
183
+ < Button
184
+ style = { applicationstyle . customButtonStyle }
185
+ color = "primary"
186
+ onClick = { search }
187
+ >
188
+ < i className = "fa fa-search mr-2" > </ i >
189
+ { t ( 'actions.view' ) }
190
+ </ Button >
191
+ </ Col >
192
+ </ Row >
193
+ < FormGroup row />
194
+ < FormGroup row />
195
+
150
196
< FormGroup row >
151
197
< Col sm = { 6 } >
152
198
< CustomBarGraph data = { statData } />
0 commit comments