Skip to content

Commit c24d29a

Browse files
committed
som-fix(CPDashboard): add 'Ending After' date picker to search filters
1 parent 25f8a66 commit c24d29a

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/components/CommunityPortal/CPDashboard.jsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ import { useState, useEffect } from 'react';
22
import { Container, Row, Col, Card, CardBody, Button, Input } from 'reactstrap';
33
import './CPDashboard.css';
44
import { FaCalendarAlt, FaMapMarkerAlt, FaUserAlt } from 'react-icons/fa';
5+
import DatePicker from 'react-datepicker';
6+
import 'react-datepicker/dist/react-datepicker.css';
57

68
export function CPDashboard() {
79
const [events, setEvents] = useState([]);
810
const [search, setSearch] = useState('');
11+
const [date, setDate] = useState(null);
912

1013
useEffect(() => {
1114
const mockEvents = [
@@ -79,7 +82,16 @@ export function CPDashboard() {
7982
<Input type="radio" name="dates" /> This Weekend
8083
</div>
8184
</div>
82-
<Input type="date" placeholder="Ending After" className="date-filter" />
85+
<div style={{ width: '100%' }}>
86+
<DatePicker
87+
selected={date}
88+
onChange={d => setDate(d)}
89+
placeholderText="Ending After"
90+
id="ending-after"
91+
className="date-filter"
92+
style={{ width: '100%' }}
93+
/>
94+
</div>
8395
</div>
8496
<div className="filter-item">
8597
<label htmlFor="online-only">Online</label>

0 commit comments

Comments
 (0)