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

Controlled DateInput3 does not display new values if popover is closed without selecting a date #6703

Open
kerryarts opened this issue Feb 7, 2024 · 1 comment · May be fixed by #7121
Open

Comments

@kerryarts
Copy link

Environment

  • Package version(s):
    "@blueprintjs/core": "^5.9.1",
    "@blueprintjs/datetime": "^5.3.1",
    "@blueprintjs/datetime2": "^2.3.1",
  • Operating System: Windows 11
  • Browser name and version: Firefox 122.0

Code Sandbox

Link to a minimal repro: https://codesandbox.io/p/devbox/eloquent-swanson-h79ky6?file=%2Fsrc%2FDatetimeExample.tsx

Steps to reproduce

  1. Click within the input to open the popover
  2. Click outside the popover to close it, without selecting a date
  3. Click Now to set the date

Actual behavior

The displayed date in the DateInput still shows the placeholder text, and does not change to the new value.

This only occurs if the popover was opened without a date already set, and closed without selecting a date within the popover.

Expected behavior

The displayed text in the DateInput should change to 'now'.

@sc-mitton
Copy link

Just opened a PR for this. Turns out the fix was just a one line change:
#7121

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

Successfully merging a pull request may close this issue.

3 participants