fix: force desktop date picker

This commit is contained in:
Markus
2026-08-10 13:14:26 +03:00
parent d69c64f7ef
commit c306ef1098
2 changed files with 2 additions and 5 deletions
-3
View File
@@ -61,9 +61,6 @@ Cypress.Commands.add('selectDate', { prevSubject: true }, (subject, dateObj) =>
.filter((index, el) => Cypress.$(el).text().trim() === targetDay) .filter((index, el) => Cypress.$(el).text().trim() === targetDay)
.first() .first()
.click({ force: true }) .click({ force: true })
// Wait for the MUI DatePicker
cy.get('div[role="dialog"]').should('not.exist')
} else { } else {
const currentMonthIndex = fiMonths.findIndex((m) => label.includes(m)) const currentMonthIndex = fiMonths.findIndex((m) => label.includes(m))
@@ -1,4 +1,4 @@
import { DatePicker } from '@mui/x-date-pickers' import { DesktopDatePicker } from '@mui/x-date-pickers'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
@@ -13,7 +13,7 @@ export const CustomDatePicker = ({
disabled, disabled,
}) => { }) => {
return ( return (
<DatePicker <DesktopDatePicker
disabled={disabled} disabled={disabled}
label={label} label={label}
value={value ? dayjs(value) : null} value={value ? dayjs(value) : null}