@@ -6,7 +6,7 @@ import Modal from './Modal';
66import DropDown from './DropDown' ;
77import DatePickerForm from 'components/forms/DatePickerForm' ;
88import useLocale from 'hooks/useLocale' ;
9- import { getDateRange , dateFormat } from 'lib/date' ;
9+ import { dateFormat } from 'lib/date' ;
1010import Calendar from 'assets/calendar-alt.svg' ;
1111import Icon from './Icon' ;
1212
@@ -47,6 +47,11 @@ const filterOptions = [
4747 value : '90day' ,
4848 } ,
4949 { label : < FormattedMessage id = "label.this-year" defaultMessage = "This year" /> , value : '1year' } ,
50+ {
51+ label : < FormattedMessage id = "label.all-time" defaultMessage = "All time" /> ,
52+ value : 'all' ,
53+ divider : true ,
54+ } ,
5055 {
5156 label : < FormattedMessage id = "label.custom-range" defaultMessage = "Custom range" /> ,
5257 value : 'custom' ,
@@ -55,7 +60,6 @@ const filterOptions = [
5560] ;
5661
5762function DateFilter ( { value, startDate, endDate, onChange, className } ) {
58- const { locale } = useLocale ( ) ;
5963 const [ showPicker , setShowPicker ] = useState ( false ) ;
6064 const displayValue =
6165 value === 'custom' ? (
@@ -64,12 +68,12 @@ function DateFilter({ value, startDate, endDate, onChange, className }) {
6468 value
6569 ) ;
6670
67- function handleChange ( value ) {
71+ async function handleChange ( value ) {
6872 if ( value === 'custom' ) {
6973 setShowPicker ( true ) ;
7074 return ;
7175 }
72- onChange ( getDateRange ( value , locale ) ) ;
76+ onChange ( value ) ;
7377 }
7478
7579 function handlePickerChange ( value ) {
0 commit comments