Skip to content

Comments

♻️ Align Time Picker header styling with Date Picker header#6238

Open
balajis-qb wants to merge 1 commit intoHacker0x01:mainfrom
qburst:fix/style/time-picker-header
Open

♻️ Align Time Picker header styling with Date Picker header#6238
balajis-qb wants to merge 1 commit intoHacker0x01:mainfrom
qburst:fix/style/time-picker-header

Conversation

@balajis-qb
Copy link
Contributor

@balajis-qb balajis-qb commented Feb 19, 2026

Description

Problem
As highlighted in the below image, there is a small mismatch between the DatePicker's header and TimePicker's header.

image

Code

const Default = () => {
  const [selectedDate, setSelectedDate] = useState<Date | null>(new Date());

  const handleChange = (date: Date | null) => {
    setSelectedDate(date);
  };

  return (
    <DatePicker
      selected={selectedDate}
      onChange={handleChange}
      showTimeSelect
    />
  );
};

Changes

  • Update the Time Select header to be same as the DatePicker's Header
  • Refactored the time header from a div to an h2 element for better semantic structure.
  • Added a test to ensure the default time caption is rendered correctly.

Contribution checklist

  • I have followed the contributing guidelines.
  • I have added sufficient test coverage for my changes.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

…les to match with DatePicker's header

- Updated the time header in the DatePicker component from a div to an h2 element for better semantic structure.
- Adjusted the SCSS styles to include the new h2 class for consistent styling.
- Added a test to ensure the default time caption is rendered correctly.
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.29%. Comparing base (548a1f3) to head (e5b527b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6238   +/-   ##
=======================================
  Coverage   99.29%   99.29%           
=======================================
  Files          30       30           
  Lines        3822     3822           
  Branches     1648     1665   +17     
=======================================
  Hits         3795     3795           
  Misses         26       26           
  Partials        1        1           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant