Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoApply property doesn't work #131

Closed
aralroca opened this issue May 12, 2017 · 4 comments
Closed

autoApply property doesn't work #131

aralroca opened this issue May 12, 2017 · 4 comments

Comments

@aralroca
Copy link

I added autoApply property to true:

<DateRangePicker
        onApply={this.onApply.bind(this)}
        startDate={lastWeek}
        ranges={ranges}
        endDate={today}
        maxDate={moment(today)}
        timePicker24Hour={true}
        timePickerSeconds={true}
        timePicker={true}
        autoApply={true}
        autoUpdateInput={true}
        timePickerIncrement={1}>
        <input
          type="text"
          onChange={() => {}}
          value={this.props.startDate ? `${formatDate(this.props.startDate)} - ${formatDate(this.props.endDate)}` : ''}
          className="form-control"
        />
</DateRangePicker>

But the component still showing the Apply and Cancel buttons and the apply is not automatic...

Thank you

@n1c01a5
Copy link

n1c01a5 commented Sep 23, 2017

same issue

@skratchdot
Copy link
Owner

closing this due to inactivity. please re-open if this is still an issue in v6.0.0 or greater

@emanuallan
Copy link

i believe this is still an issue as I am experiencing it with these settings

initialSettings={{
            opens: 'right',
            timePicker: showTime,
            singleDatePicker: true,
            timePickerIncrement: 15,
            //showDropdowns: true,
            autoApply: true,
            autoUpdateInput: true,
            startDate: parseISO(dayjs.utc(date).format()),
            //minYear: dayjs().year(),
            //maxYear: dayjs().year() + 3,
            parentEl: parentEl,
            locale: {
              format: 'M/D/YYYY h:mm a',
            },
          }}

@emanuallan
Copy link

ahh, looks like showingTime and and autoApply are not compatible with each other. Works when not used together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants