react-date-range icon indicating copy to clipboard operation
react-date-range copied to clipboard

Can't change date preview input labels if no default value

Open jeromemmiranda opened this issue 6 years ago • 2 comments

Can't change date preview input labels if no default value

If preview date is enabled and there's no default value to the date range. Labels are showing "Early" and "Continuous".

[BUG] Bug Reproduce Steps

Use a date range picker, provide a ranges props like the one below. <DateRangePicker ranges={[{ startDate: null, endDate: null, key: 'selection' }]} />

[BUG] Expected behaviour

Can pass custom labels to input date preview. Something like: <DateRangePicker ranges={[{ startDateLabel: 'Start Date', startDate: null, endDateLabel: 'End Date', endDate: null, key: 'selection' }]} />

Environment

Package Version: ~1.0.0-beta React version: ~16.8.6 Node version: v10.15.3 Browser: Google Chrome 73.0.3683.103

jeromemmiranda avatar Apr 12 '19 02:04 jeromemmiranda

+1 for being able to change labels of "Early" and "Continuous".

jduffy7 avatar Apr 12 '19 17:04 jduffy7

FYI: You can set custom placeholder for labels Early and Continuous via props now.

    /** default: `Early` */
    startDatePlaceholder?: string | undefined;
    /** default: `Continuous` */
    endDatePlaceholder?: string | undefined;

khajimatov avatar Mar 16 '23 06:03 khajimatov