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: default time selection #4552

Merged
merged 4 commits into from
Mar 3, 2024

Conversation

kiselevskym
Copy link

  1. Datepicker with showTimeSelect and minTIme.
  2. The datepicker should be empty.
  3. Select any day you want .

Actual Result (AR):
Despite disabling the start time, the Datepicker defaults to selecting the beginning of the day.

Expected Result (ER):
The Datepicker should select the minimum allowable time upon choosing a day.

image image

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

✅ This pull request was sent to the PullRequest network.


@kiselevskym you can click here to see the review status or cancel the code review job.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

PullRequest Breakdown

Reviewable lines of change

+ 62
- 0

79% JavaScript (tests)
21% JavaScript

Type of change

Fix - These changes are likely to be fixing a bug or issue.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

The change looks good to me with a minTIme support in time selection

Image of Xiaoyong W Xiaoyong W


Reviewed with ❤️ by PullRequest

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

This change is consistent with the description, no major concern.

Image of Jacques Jacques


Reviewed with ❤️ by PullRequest

@martijnrusschen
Copy link
Member

Please make sure to add a test case to check if the min time gets set

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.52%. Comparing base (d3116a5) to head (810f510).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4552   +/-   ##
=======================================
  Coverage   95.51%   95.52%           
=======================================
  Files          29       29           
  Lines        2566     2569    +3     
  Branches     1053     1055    +2     
=======================================
+ Hits         2451     2454    +3     
  Misses        115      115           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

PullRequest reviewed the updates made to #4552 since our last review was posted. This includes comments that have been posted by non-PullRequest reviewers. No further issues were found.

Reviewed by:

Image of Xiaoyong W Xiaoyong W

@kiselevskym
Copy link
Author

Please make sure to add a test case to check if the min time gets set

Test cases were added

@@ -0,0 +1,52 @@
import React, { useState } from "react";
import DatePicker from "../src/index.jsx";
import { mount } from "enzyme";
Copy link
Member

Choose a reason for hiding this comment

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

Can you avoid using enzyme? You can use React Testing Library.

Copy link
Author

Choose a reason for hiding this comment

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

no prob, can you check it now?

Copy link
Author

Choose a reason for hiding this comment

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

@martijnrusschen martijnrusschen merged commit c2b3fde into Hacker0x01:main Mar 3, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants