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

feat(ui-calendar,ui-date-input): update DateInput2 api, add placeholder hint #1693

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

balzss
Copy link
Contributor

@balzss balzss commented Sep 23, 2024

v10 port of #1640

@balzss balzss requested review from matyasf and HerrTopi September 23, 2024 09:54
@balzss balzss self-assigned this Sep 23, 2024
Copy link

github-actions bot commented Sep 23, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-10-02 11:37 UTC

Copy link
Collaborator

@matyasf matyasf left a comment

Choose a reason for hiding this comment

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

other than a new unit test would be good for Calendar, it looks good!

Comment on lines +148 to +171
// this is needed for locales that doesn't use the latin script for numbers e.g.: arabic
const yearNumber = Number(
this.state.visibleMonth
.clone()
.locale('en')
.subtract({ months: 1 })
.format('YYYY')
)
return (
!this.props.withYearPicker ||
(this.props.withYearPicker &&
Number(
this.state.visibleMonth.clone().subtract({ months: 1 }).format('YYYY')
) >= this.props.withYearPicker.startYear)
yearNumber >= this.props.withYearPicker.startYear)
)
}

get hasNextMonth() {
// this is needed for locales that doesn't use the latin script for numbers e.g.: arabic
const yearNumber = Number(
this.state.visibleMonth
.clone()
.locale('en')
.add({ months: 1 })
.format('YYYY')
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you write a unit test for these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is it ok if it's added to the separate pr with all the other unit tests for dateinput2?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yep, thats OK

@balzss balzss requested a review from matyasf September 30, 2024 09:01
@balzss balzss merged commit ee9dfab into master Oct 2, 2024
10 of 11 checks passed
@balzss balzss deleted the feat/dateinput2-api-update-v10 branch October 2, 2024 11:36
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.

3 participants