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

fix: annotation modal dateRangePicker saved invalid value #13969

Merged

Conversation

zhaoyongjie
Copy link
Member

@zhaoyongjie zhaoyongjie commented Apr 6, 2021

SUMMARY

Since moment.js cannot parse YYY-MM-DD hh:mm a format, an error will occur.

Now we use a consistent format for saving and parsing datetime object.

closes: #13958

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

image

After

image

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Apr 6, 2021

Codecov Report

Merging #13969 (776f17d) into master (e3efaba) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 776f17d differs from pull request most recent head 805aef1. Consider uploading reports for the commit 805aef1 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13969      +/-   ##
==========================================
- Coverage   78.96%   78.96%   -0.01%     
==========================================
  Files         936      936              
  Lines       47409    47408       -1     
  Branches     5941     5940       -1     
==========================================
- Hits        37438    37437       -1     
  Misses       9844     9844              
  Partials      127      127              
Flag Coverage Δ
javascript 68.45% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tend/src/views/CRUD/annotation/AnnotationModal.tsx 62.96% <100.00%> (-0.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3efaba...805aef1. Read the comment docs.

@zhaoyongjie zhaoyongjie closed this Apr 6, 2021
@zhaoyongjie zhaoyongjie reopened this Apr 6, 2021
@junlincc junlincc requested a review from nytai April 6, 2021 16:34
@@ -311,14 +311,13 @@ const AnnotationModal: FunctionComponent<AnnotationModalProps> = ({
<span className="required">*</span>
</div>
<RangePicker
format="YYYY-MM-DD hh:mm a"
format="YYYY-MM-DD HH:mm"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should start collecting these formats in a module.

@zhaoyongjie zhaoyongjie force-pushed the fix_annotation_daterange_picker branch from 1a15e2d to 805aef1 Compare April 7, 2021 12:08
@zhaoyongjie zhaoyongjie merged commit f06d534 into apache:master Apr 7, 2021
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Annotation]Adding annotation date picker shows "Invalid date"
4 participants