mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Add inclusive and exclusive for date start and end (#12859)
This commit is contained in:
@@ -20,6 +20,7 @@ import React from 'react';
|
||||
import { t } from '@superset-ui/core';
|
||||
import { SEPARATOR } from 'src/explore/dateFilterUtils';
|
||||
import { Input } from 'src/common/components';
|
||||
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
|
||||
import { FrameComponentProps } from '../types';
|
||||
import DateFunctionTooltip from './DateFunctionTooltip';
|
||||
|
||||
@@ -59,13 +60,25 @@ export function AdvancedFrame(props: FrameComponentProps) {
|
||||
<i className="fa fa-info-circle text-muted" />
|
||||
</DateFunctionTooltip>
|
||||
</div>
|
||||
<div className="control-label">{t('START')}</div>
|
||||
<div className="control-label">
|
||||
{t('START (INCLUSIVE)')}{' '}
|
||||
<InfoTooltipWithTrigger
|
||||
tooltip={t('Start date included in time range')}
|
||||
placement="right"
|
||||
/>
|
||||
</div>
|
||||
<Input
|
||||
key="since"
|
||||
value={since}
|
||||
onChange={e => onChange('since', e.target.value)}
|
||||
/>
|
||||
<div className="control-label">{t('END')}</div>
|
||||
<div className="control-label">
|
||||
{t('END (EXCLUSIVE)')}{' '}
|
||||
<InfoTooltipWithTrigger
|
||||
tooltip={t('End date excluded from time range')}
|
||||
placement="right"
|
||||
/>
|
||||
</div>
|
||||
<Input
|
||||
key="until"
|
||||
value={until}
|
||||
|
||||
@@ -23,6 +23,7 @@ import { isInteger } from 'lodash';
|
||||
import { Col, DatePicker, InputNumber, Row } from 'src/common/components';
|
||||
import { Radio } from 'src/common/components/Radio';
|
||||
import { Select } from 'src/components/Select';
|
||||
import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
|
||||
import {
|
||||
SINCE_GRAIN_OPTIONS,
|
||||
SINCE_MODE_OPTIONS,
|
||||
@@ -110,7 +111,13 @@ export function CustomFrame(props: FrameComponentProps) {
|
||||
<div className="section-title">{t('Configure custom time range')}</div>
|
||||
<Row gutter={24}>
|
||||
<Col span={12}>
|
||||
<div className="control-label">{t('START')}</div>
|
||||
<div className="control-label">
|
||||
{t('START (INCLUSIVE)')}{' '}
|
||||
<InfoTooltipWithTrigger
|
||||
tooltip={t('Start date included in time range')}
|
||||
placement="right"
|
||||
/>
|
||||
</div>
|
||||
<Select
|
||||
options={SINCE_MODE_OPTIONS}
|
||||
value={SINCE_MODE_OPTIONS.filter(
|
||||
@@ -162,7 +169,13 @@ export function CustomFrame(props: FrameComponentProps) {
|
||||
)}
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<div className="control-label">{t('END')}</div>
|
||||
<div className="control-label">
|
||||
{t('END (EXCLUSIVE)')}{' '}
|
||||
<InfoTooltipWithTrigger
|
||||
tooltip={t('End date excluded from time range')}
|
||||
placement="right"
|
||||
/>
|
||||
</div>
|
||||
<Select
|
||||
options={UNTIL_MODE_OPTIONS}
|
||||
value={UNTIL_MODE_OPTIONS.filter(
|
||||
|
||||
Reference in New Issue
Block a user