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)
|
||||
.first()
|
||||
.click({ force: true })
|
||||
|
||||
// Wait for the MUI DatePicker
|
||||
cy.get('div[role="dialog"]').should('not.exist')
|
||||
} else {
|
||||
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 PropTypes from 'prop-types'
|
||||
|
||||
@@ -13,7 +13,7 @@ export const CustomDatePicker = ({
|
||||
disabled,
|
||||
}) => {
|
||||
return (
|
||||
<DatePicker
|
||||
<DesktopDatePicker
|
||||
disabled={disabled}
|
||||
label={label}
|
||||
value={value ? dayjs(value) : null}
|
||||
|
||||
Reference in New Issue
Block a user