interface Props {
alignEndDateCalandarRight?: boolean;
className?: string;
- clearButtonLabel: string;
+ endClearButtonLabel: string;
fromLabel: string;
inputSize?: InputSizeKeys;
maxDate?: Date;
minDate?: Date;
onChange: (date: DateRange) => void;
separatorText?: string;
+ startClearButtonLabel: string;
toLabel: string;
value?: DateRange;
valueFormatter?: (date?: Date) => string;
render() {
const {
alignEndDateCalandarRight,
- clearButtonLabel,
+ startClearButtonLabel,
+ endClearButtonLabel,
fromLabel,
inputSize = 'full',
minDate,
return (
<div className={classNames('sw-flex sw-items-center', this.props.className)}>
<DatePicker
- clearButtonLabel={clearButtonLabel}
+ clearButtonLabel={startClearButtonLabel}
currentMonth={this.to}
data-test="from"
highlightTo={this.to}
<LightLabel className="sw-mx-2">{separatorText ?? '–'}</LightLabel>
<DatePicker
alignRight={alignEndDateCalandarRight}
- clearButtonLabel={clearButtonLabel}
+ clearButtonLabel={endClearButtonLabel}
currentMonth={this.from}
data-test="to"
highlightFrom={this.from}
render(
<IntlWrapper messages={{ next_: 'next', previous_: 'previous' }}>
<DateRangePicker
- clearButtonLabel="clear"
+ endClearButtonLabel="clear end date"
fromLabel="from"
onChange={jest.fn()}
+ startClearButtonLabel="clear start date"
toLabel="to"
valueFormatter={defaultFormatter}
{...overrides}
<DateRangePicker
className="sw-w-abs-350 sw-mt-4"
- clearButtonLabel={translate('clear')}
+ startClearButtonLabel={translate('clear.start')}
+ endClearButtonLabel={translate('clear.end')}
fromLabel={translate('start_date')}
onChange={props.handleDateSelection}
separatorText={translate('to_')}
const dateRange = { from: this.props.minSubmittedAt, to: this.props.maxExecutedAt };
return (
<DateRangePicker
- clearButtonLabel={translate('clear')}
+ startClearButtonLabel={translate('clear.start')}
+ endClearButtonLabel={translate('clear.end')}
fromLabel={translate('start_date')}
toLabel={translate('end_date')}
onChange={this.handleDateRangeChange}
return (
<DateRangePicker
- clearButtonLabel={translate('clear')}
+ startClearButtonLabel={translate('clear.start')}
+ endClearButtonLabel={translate('clear.end')}
fromLabel={translate('start_date')}
onChange={this.handlePeriodChange}
separatorText={translate('to_')}
<div className="sw-flex">
<DateRangePicker
className="sw-w-abs-350"
- clearButtonLabel={translate('clear')}
+ startClearButtonLabel={translate('clear.start')}
+ endClearButtonLabel={translate('clear.end')}
fromLabel={translate('start_date')}
onChange={this.handleChange}
separatorText={translate('to_')}
return (
<div className="sw-flex sw-gap-2">
<DateRangePicker
- clearButtonLabel={intl.formatMessage({ id: 'clear' })}
+ startClearButtonLabel={intl.formatMessage({ id: 'clear.start' })}
+ endClearButtonLabel={intl.formatMessage({ id: 'clear.end' })}
fromLabel={intl.formatMessage({ id: 'start_date' })}
inputSize="small"
separatorText={intl.formatMessage({ id: 'to_' })}
Fr=Fr
Sa=Sa
+clear.start=Clear start date
+clear.end=Clear end date
+
#------------------------------------------------------------------------------
#
# ALM