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

Date range input selection will close the whole dialog #2759

Closed
gasolin opened this issue Aug 3, 2018 · 2 comments
Closed

Date range input selection will close the whole dialog #2759

gasolin opened this issue Aug 3, 2018 · 2 comments

Comments

@gasolin
Copy link

gasolin commented Aug 3, 2018

Environment

  • Package version(s): 3.0.1(core) 3.0.0(datetime)
  • Browser and OS versions: firefox 60.0.2 / ubuntu 16.04

Steps to reproduce

  1. Put a Date range input inside dialog component, like
 <Dialog
  icon="calendar"
  onClose={this.handleDialogClose}
   title={intl.formatMessage({ id: 'timeframe.custom' })}
   autoFocus
   canEscapeKeyClose
   canOutsideClickClose
   enforceFocus
   usePortal
   isOpen={this.state.isOpen}
  >
          <div className={Classes.DIALOG_BODY}>
            <DateRangeInput
              allowSingleDayRange
              closeOnSelection
              formatDate={dateFormat.formatDate}
              parseDate={dateFormat.parseDate}
              onChange={this.handleRangeChange}
            />
           </div>
</Dialog>
  1. select date with Date range input

Actual behavior

  1. when a date is selected, the whole dialog is also closed

when showing same date range input without dialog, it behave normally

Expected behavior

  1. when a date is selected, the whole dialog is keep showing

Possible solution

The dialog and Date range input might share the same event or property to close the dialog/popup.
Should use the separate one so the behavior won't interfere

@threeid
Copy link

threeid commented Aug 3, 2018

#2756 will fix this.

@giladgray
Copy link
Contributor

yeah literally about to be fixed. also a duplicate of #2753.

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

3 participants