Skip to content

feat(module:datepicker): send event emitter when panel mode change#8685

Merged
Laffery merged 1 commit into
NG-ZORRO:masterfrom
Nicoss54:feature/month-year-change
Aug 23, 2024
Merged

feat(module:datepicker): send event emitter when panel mode change#8685
Laffery merged 1 commit into
NG-ZORRO:masterfrom
Nicoss54:feature/month-year-change

Conversation

@Nicoss54

@Nicoss54 Nicoss54 commented Aug 7, 2024

Copy link
Copy Markdown
Collaborator

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Currently panel mode change event is not sent when user click on the arrow on the header panel of the datepicker.

This is not the same behavior of the ant design. When user click on the arrow we must send the new mode and the date

Issue Number: #8648

What is the new behavior?

An event is sent each time user click on an arrow, and the event send the information as an object

{ date, mode }

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@Nicoss54 Nicoss54 requested a review from wenqi73 as a code owner August 7, 2024 07:50
@Nicoss54 Nicoss54 requested review from HyperLife1119 and simplejason and removed request for wenqi73 August 7, 2024 07:50
@Nicoss54 Nicoss54 self-assigned this Aug 7, 2024
@zorro-bot

zorro-bot Bot commented Aug 7, 2024

Copy link
Copy Markdown

This preview will be available after the AzureCI is passed.

@codecov

codecov Bot commented Aug 7, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 95.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.58%. Comparing base (0a4f12c) to head (8f87cb8).
Report is 20 commits behind head on master.

Files Patch % Lines
...ponents/date-picker/lib/decade-header.component.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8685      +/-   ##
==========================================
+ Coverage   91.54%   91.58%   +0.03%     
==========================================
  Files         536      538       +2     
  Lines       18443    18459      +16     
  Branches     2907     2816      -91     
==========================================
+ Hits        16883    16905      +22     
+ Misses       1241     1237       -4     
+ Partials      319      317       -2     

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

Comment thread components/date-picker/date-picker.component.ts Outdated
Comment thread components/date-picker/standard-types.ts Outdated
@Nicoss54

Nicoss54 commented Aug 8, 2024

Copy link
Copy Markdown
Collaborator Author

@HyperLife1119 all is done

@Nicoss54 Nicoss54 requested a review from HyperLife1119 August 8, 2024 07:45
Comment thread components/date-picker/standard-types.ts Outdated
@Nicoss54 Nicoss54 requested a review from HyperLife1119 August 8, 2024 12:08
@Nicoss54

Nicoss54 commented Aug 8, 2024

Copy link
Copy Markdown
Collaborator Author

@HyperLife1119 change are made :)

@HyperLife1119 HyperLife1119 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Comment thread components/date-picker/standard-types.ts Outdated
export type NzPanelChangeType =
| { mode: NzDateMode; date: Date }
| {
mode: [starMode: NzDateMode, endMode: NzDateMode];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

startMode

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done

@Laffery Laffery added this to the v18.2 milestone Aug 18, 2024
Comment thread components/date-picker/doc/index.en-US.md Outdated

@Laffery Laffery left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@Laffery Laffery merged commit 6462a47 into NG-ZORRO:master Aug 23, 2024
@Laffery Laffery mentioned this pull request May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DatePicker Add API for month and year change events

4 participants