fix(SW-649): remove superfluous variable
This commit is contained in:
@@ -56,7 +56,6 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) {
|
||||
.reverse()
|
||||
.map((year) => ({ value: year, label: year.toString() }))
|
||||
|
||||
// Get max days based on selected month/year
|
||||
const daysInMonth =
|
||||
selectedMonth !== null && selectedYear !== null
|
||||
? dt(`${selectedYear}-${selectedMonth + 1}-01`).daysInMonth()
|
||||
@@ -82,8 +81,7 @@ export default function DateSelect({ name, registerOptions = {} }: DateProps) {
|
||||
* must subtract by 1 to get the selected month
|
||||
*/
|
||||
case DateName.month:
|
||||
const monthZeroBased = value - 1
|
||||
newMonth = monthZeroBased
|
||||
newMonth = value - 1
|
||||
setSelectedMonth(newMonth)
|
||||
if (selectedDay) {
|
||||
const maxDays = dt(`${newYear}-${value}-01`).daysInMonth()
|
||||
|
||||
Reference in New Issue
Block a user