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

DateInput doesn't appear over other elements when in ControlGroup #2565

Closed
lion3ls opened this issue Jun 3, 2018 · 1 comment
Closed

DateInput doesn't appear over other elements when in ControlGroup #2565

lion3ls opened this issue Jun 3, 2018 · 1 comment

Comments

@lion3ls
Copy link

lion3ls commented Jun 3, 2018

Environment

  • Package version(s): 2.3.1
  • Browser and OS versions: Chrome 67 & Ubuntu 17.10

Steps to reproduce

import React from "react";

import { ControlGroup } from "@blueprintjs/core";
import { DateInput, IDateFormatProps } from "@blueprintjs/datetime";

const jsDateFormatter: IDateFormatProps = {
  // note that the native implementation of Date functions differs between browsers
  formatDate: date => date.toLocaleDateString(),
  parseDate: str => new Date(str),
  placeholder: "M/D/YYYY",
};

export const App = () => (
  <>
    <ControlGroup>
      <DateInput {...jsDateFormatter} />
    </ControlGroup>
    <ControlGroup>
      <input type="text" className="pt-input" />
    </ControlGroup>
  </>
);

Both DateInput and text input have to be in a ControlGroup. Other popovers do not suffer of the same bug.

Actual behavior

image
Second input goes over the datepicker popover.

Expected behavior

image
Datepicker to be over all other elements.

Possible solution

I was able to fix it by setting transform: none on ControlGroup.

import React from "react";

import { ControlGroup } from "@blueprintjs/core";
import { DateInput, IDateFormatProps } from "@blueprintjs/datetime";

const jsDateFormatter: IDateFormatProps = {
  // note that the native implementation of Date functions differs between browsers
  formatDate: date => date.toLocaleDateString(),
  parseDate: str => new Date(str),
  placeholder: "M/D/YYYY",
};

export const App = () => (
  <>
    <ControlGroup style={{ transform: "none" }}>
      <DateInput {...jsDateFormatter} />
    </ControlGroup>
    <ControlGroup>
      <input type="text" className="pt-input" />
    </ControlGroup>
  </>
);
@giladgray
Copy link
Contributor

@Lsuss this is a duplicate of #2368 and will be fixed by #2539

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

No branches or pull requests

2 participants