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

Refine type annotation for Date element #2681

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

daya0576
Copy link
Sponsor Contributor

This PR refines the static type annotation for Date element, as the param value accepts different type of inputs:

ui.date(value='2023-01-01', on_change=lambda e: result.set_text(e.value))
ui.date({'from': '2023-01-01', 'to': '2023-01-05'}).props('range')
ui.date(['2023-01-01', '2023-01-02', '2023-01-03']).props('multiple')
ui.date([{'from': '2023-01-01', 'to': '2023-01-05'}, '2023-01-07']).props('multiple range')

@daya0576 daya0576 changed the title Refine element date type annotation Refine Date element type annotation Mar 12, 2024
@daya0576 daya0576 changed the title Refine Date element type annotation Refine type annotation for Date element Mar 12, 2024
@daya0576 daya0576 changed the title Refine type annotation for Date element Refine type annotation for Date element Mar 12, 2024
@daya0576
Copy link
Sponsor Contributor Author

Hi @falkoschindler, could u help review this PR, since I'm unable to add reviewers for it.

@falkoschindler falkoschindler self-requested a review March 13, 2024 07:57
@falkoschindler
Copy link
Contributor

Thanks for the pull request, @daya0576!
Sure, it's on my list. I just haven't found the time to look into it. But I'll review it shortly.

Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

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

Thanks again for your contribution! No matter the size, every change helps us improve and refine the project. Your effort is truly appreciated! 🙂

@falkoschindler falkoschindler merged commit ecbb17b into zauberzeug:main Mar 14, 2024
1 check passed
@falkoschindler falkoschindler added the enhancement New feature or request label Mar 14, 2024
@falkoschindler falkoschindler added this to the 1.4.19 milestone Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants