mirror of
https://github.com/UniversityOfHelsinkiCS/ohtuilmo.git
synced 2026-10-12 19:03:41 +03:00
fix: force desktop date picker
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user