fix(datepicker): Full width datepicker on filter value select (#32064)
This commit is contained in:
parent
9e5876dc17
commit
cde2d49c95
|
|
@ -16,9 +16,17 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
import { DatePicker as AntdDatePicker } from 'antd-v5';
|
import { DatePicker as AntdDatePicker, DatePickerProps } from 'antd-v5';
|
||||||
|
import { css } from '@superset-ui/core';
|
||||||
|
|
||||||
export const DatePicker = AntdDatePicker;
|
export const DatePicker = (props: DatePickerProps) => (
|
||||||
|
<AntdDatePicker
|
||||||
|
css={css`
|
||||||
|
width: 100%;
|
||||||
|
`}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
// Disable ESLint rule to allow tsc to infer proper type for RangePicker.
|
// Disable ESLint rule to allow tsc to infer proper type for RangePicker.
|
||||||
// eslint-disable-next-line prefer-destructuring
|
// eslint-disable-next-line prefer-destructuring
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ import {
|
||||||
parseDttmToDate,
|
parseDttmToDate,
|
||||||
BinaryAdhocFilter,
|
BinaryAdhocFilter,
|
||||||
SimpleAdhocFilter,
|
SimpleAdhocFilter,
|
||||||
css,
|
|
||||||
customTimeRangeDecode,
|
customTimeRangeDecode,
|
||||||
computeCustomDateTime,
|
computeCustomDateTime,
|
||||||
fetchTimeRange,
|
fetchTimeRange,
|
||||||
|
|
@ -223,9 +222,6 @@ export default function TimeOffsetControls({
|
||||||
<div>
|
<div>
|
||||||
<ControlHeader {...props} />
|
<ControlHeader {...props} />
|
||||||
<DatePicker
|
<DatePicker
|
||||||
css={css`
|
|
||||||
width: 100%;
|
|
||||||
`}
|
|
||||||
onChange={(datetime: Dayjs) =>
|
onChange={(datetime: Dayjs) =>
|
||||||
onChange(datetime ? datetime.format(DAYJS_FORMAT) : '')
|
onChange(datetime ? datetime.format(DAYJS_FORMAT) : '')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue