You've already forked joplin
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:
@@ -8,6 +8,7 @@ import { focus } from '@joplin/lib/utils/focusHandler';
|
|||||||
import Dialog from './Dialog';
|
import Dialog from './Dialog';
|
||||||
import { ChangeEvent } from 'react';
|
import { ChangeEvent } from 'react';
|
||||||
import { formatDateTimeLocalToMs, isValidDate } from '@joplin/utils/time';
|
import { formatDateTimeLocalToMs, isValidDate } from '@joplin/utils/time';
|
||||||
|
import lightTheme from '@joplin/lib/themes/light';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
themeId: number;
|
themeId: number;
|
||||||
@@ -117,6 +118,15 @@ export default class PromptDialog extends React.Component<Props, any> {
|
|||||||
borderColor: theme.dividerColor,
|
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 = {
|
this.styles_.select = {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||||
control: (provided: any) => {
|
control: (provided: any) => {
|
||||||
@@ -256,7 +266,7 @@ export default class PromptDialog extends React.Component<Props, any> {
|
|||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
type="datetime-local"
|
type="datetime-local"
|
||||||
className='datetime-picker'
|
className='datetime-picker'
|
||||||
style={styles.input}
|
style={styles.dateTimeInput}
|
||||||
/>;
|
/>;
|
||||||
} else if (this.props.inputType === 'tags') {
|
} else if (this.props.inputType === 'tags') {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||||
|
Reference in New Issue
Block a user