Added cc contract searching by date range BOD-236
This commit is contained in:
@@ -10,13 +10,22 @@ export default function TimeTicketsDatesSelector() {
|
||||
const history = useHistory();
|
||||
|
||||
const handleChange = (dates) => {
|
||||
const [start, end] = dates;
|
||||
if (dates) {
|
||||
const [start, end] = dates;
|
||||
|
||||
if (!!start && !!end) {
|
||||
if (!!start && !!end) {
|
||||
history.push({
|
||||
search: queryString.stringify({
|
||||
start: start.format("YYYY-MM-DD"),
|
||||
end: end.format("YYYY-MM-DD"),
|
||||
}),
|
||||
});
|
||||
}
|
||||
} else {
|
||||
history.push({
|
||||
search: queryString.stringify({
|
||||
start: start.format("YYYY-MM-DD"),
|
||||
end: end.format("YYYY-MM-DD"),
|
||||
start: null,
|
||||
end: null,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user