1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-10 22:11:50 +02:00

Desktop: Fixes #12816: Date/Time dialog button not visible in dark mode

This commit is contained in:
Laurent Cozic
2025-07-30 15:22:34 +01:00
parent 012297d52a
commit 5a64222276

View File

@@ -8,6 +8,7 @@ import { focus } from '@joplin/lib/utils/focusHandler';
import Dialog from './Dialog';
import { ChangeEvent } from 'react';
import { formatDateTimeLocalToMs, isValidDate } from '@joplin/utils/time';
import lightTheme from '@joplin/lib/themes/light';
interface Props {
themeId: number;
@@ -117,6 +118,15 @@ export default class PromptDialog extends React.Component<Props, any> {
borderColor: theme.dividerColor,
};
// The button to change the date/time cannot be customized easily so we need to use the
// light theme for that particular component.
this.styles_.dateTimeInput = {
...this.styles_.input,
color: lightTheme.color,
backgroundColor: lightTheme.backgroundColor,
borderColor: lightTheme.dividerColor,
};
this.styles_.select = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
control: (provided: any) => {
@@ -256,7 +266,7 @@ export default class PromptDialog extends React.Component<Props, any> {
onChange={onChange}
type="datetime-local"
className='datetime-picker'
style={styles.input}
style={styles.dateTimeInput}
/>;
} else if (this.props.inputType === 'tags') {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied