skratchdot / react-bootstrap-daterangepicker

A date/time picker for react (using bootstrap). This is a react wrapper around the bootstrap-daterangepicker project.
http://projects.skratchdot.com/react-bootstrap-daterangepicker/
Other
475 stars 204 forks source link

autoApply not working #91

Closed ir-fuel closed 4 years ago

ir-fuel commented 8 years ago

This is my code

              <DateRangePicker
                minDate={project.startDate}
                startDate={project.endDate || moment()}
                locale={{
                  format: this.props.settings.dateFormatter
                }}
                timePicker={true}
                singleDatePicker={true}
                autoApply={true}
                onEvent={this.endDateChanged}
                >
                {endDateButton}
              </DateRangePicker>

autoApply does not hide the buttons, nor does it fire the onEvent callback when the selection changes

screen shot 2016-09-11 at 16 20 34

skratchdot commented 8 years ago

There's some code that prevents this in the upstream library: https://github.com/dangrossman/bootstrap-daterangepicker/blob/897dcb4a3dff2ba02cc4eced28ab9f21bbca3530/daterangepicker.js#L363-L364

If you remove timePicker={true} then it might start working?

rators commented 7 years ago

Having the same issue with this component. Any word on a fix?

skratchdot commented 7 years ago

@rators- not as far as I know. I haven't looked at the upstream code in depth, but it looks like that line still exists. For whatever reason, autoApply isn't compatible with the timePicker. I'll leave this bug open, and if it ever changes upstream, then we can close this bug out.

aralroca commented 7 years ago

This bug is still happening in last version...

n1c01a5 commented 6 years ago

same issue

VeryVito commented 6 years ago

Still dead. What exactly is the upstream issue? Anything we can hack around in the mean time?

skratchdot commented 4 years ago

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