Skip to content

Commit

Permalink
fix(dateField): remove ?
Browse files Browse the repository at this point in the history
  • Loading branch information
masopego committed Aug 9, 2022
1 parent 3aef4ab commit 3f3603e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Fields/Date/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function CustomDateSelect({
}
return arr
}
const selectedYear = new Date(dateSelect.dateValue)?.getFullYear()
const selectedMonth = new Date(dateSelect.dateValue)?.getMonth()
const selectedYear = new Date(dateSelect.dateValue).getFullYear()
const selectedMonth = new Date(dateSelect.dateValue).getMonth()

const dayOptions = React.useMemo(() => {
const maxRange = getDaysInMonth(new Date(selectedYear, selectedMonth))
Expand Down Expand Up @@ -147,9 +147,9 @@ const DatePicker = ({
value={selectedDate}
onChange={setSelectedDate}
locale={mapLanguagues[language]}
yearFormat={dateFormat?.year}
monthFormat={dateFormat?.month}
dayFormat={dateFormat?.day}
yearFormat={dateFormat.year}
monthFormat={dateFormat.month}
dayFormat={dateFormat.day}
firstYear={1900}
lastYear={getInitialDate().getFullYear()}
/>
Expand Down

0 comments on commit 3f3603e

Please sign in to comment.