From 93866d3c8d90dce41dbca7e5c8a2267468936c4a Mon Sep 17 00:00:00 2001 From: Elliot Otchet Date: Wed, 11 Dec 2024 16:00:30 -0500 Subject: [PATCH] Updates per feedback from Sky. --- cypress/component/Forms/forms.spec.js | 2 +- src/components/DuosDatePicker.tsx | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cypress/component/Forms/forms.spec.js b/cypress/component/Forms/forms.spec.js index 30ca684c1..ea32e98c9 100644 --- a/cypress/component/Forms/forms.spec.js +++ b/cypress/component/Forms/forms.spec.js @@ -19,7 +19,7 @@ describe('FormField - Tests', () => { id:'releaseDate', title:'Release Date', defaultValue: dayjs(), - validators: [FormValidators.REQUIRED, FormValidators.DATE] + validators: [FormValidators.REQUIRED, FormValidators.DATEJS] }; mount(); cy.get('#lbl_releaseDate').contains('Release Date*'); diff --git a/src/components/DuosDatePicker.tsx b/src/components/DuosDatePicker.tsx index 4c2bec12d..3a71ab988 100644 --- a/src/components/DuosDatePicker.tsx +++ b/src/components/DuosDatePicker.tsx @@ -17,8 +17,8 @@ import type {} from '@mui/x-date-pickers/themeAugmentation'; interface DUOSDatePickerProps { inputFormat: string; value: Dayjs; - onChange: Function; - onError: Function; + onChange: any; + onError: any; readOnly: boolean; } @@ -41,7 +41,7 @@ export const DuosDatePicker = (props: DUOSDatePickerProps) => { fontFamily: 'Montserrat', fontSize: '13px', fontWeight: '400', - padding: '7px 20px 7px 20px', + padding: '7px 20px', }, }, }, @@ -56,10 +56,10 @@ export const DuosDatePicker = (props: DUOSDatePickerProps) => { styleOverrides:{ weekDayLabel:{ fontFamily: 'Montserrat', - color: '#000', + color: 'black', fontSize: '13px', fontWeight: '400', - padding: '7px 20px 7px 20px', + padding: '7px 20px', '&:first-of-type': { color: 'red', }, @@ -82,10 +82,10 @@ export const DuosDatePicker = (props: DUOSDatePickerProps) => { '--weekend': 'red', borderRadius: '8px', fontFamily: 'Montserrat', - color: '#000', + color: 'black', fontSize: '13px', fontWeight: '400', - padding: '7px 20px 7px 20px', + padding: '7px 20px', '&.Mui-selected': { backgroundColor: '#216FB4', '&:hover': { @@ -102,10 +102,10 @@ export const DuosDatePicker = (props: DUOSDatePickerProps) => { styleOverrides: { yearButton: { fontFamily: 'Montserrat', - color: '#000', + color: 'black', fontSize: '13px', fontWeight: '400', - padding: '7px 20px 7px 20px', + padding: '7px 20px', '&.Mui-selected': { backgroundColor: '#216FB4', '&:hover': { @@ -128,10 +128,10 @@ export const DuosDatePicker = (props: DUOSDatePickerProps) => { }, label:{ fontFamily: 'Montserrat', - color: '#000', + color: 'black', fontSize: '13px', fontWeight: '400', - padding: '7px 20px 7px 20px', + padding: '7px 20px', }, } }, @@ -181,8 +181,8 @@ export const DuosDatePicker = (props: DUOSDatePickerProps) => { label={'Select a date'} format={inputFormat} value={value} - onAccept={(value)=>{onChange(value);}} - onError={(error, value)=> onError(error, value)} + onAccept={onChange} + onError={onError} dayOfWeekFormatter={(day) => (`${day.format('ddd')}`)} readOnly={readOnly} slotProps={{