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

Programmatically reset ix-date-picker selection #1166

Closed
2 tasks done
karakuz opened this issue Mar 17, 2024 · 2 comments
Closed
2 tasks done

Programmatically reset ix-date-picker selection #1166

karakuz opened this issue Mar 17, 2024 · 2 comments
Labels
type: enhancement New feature or request wait for response Wait for author response

Comments

@karakuz
Copy link

karakuz commented Mar 17, 2024

Prerequisites

  • I have read the Contributing Guidelines.
  • I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.

Suggestion / feature request

Add ability to reset date selections on ix-date-picker programmatically

For instance if user selected 23rd of March previously and when we need to reset form inputs programmatically, we need to reset date picker to default version as well(without having previous date as marked - 23rd of March in this case)

image

@karakuz karakuz added triage We discuss this topic in our internal weekly type: enhancement New feature or request labels Mar 17, 2024
@matthiashader
Copy link
Collaborator

Thanks for your input! Currently you can reset the date if you set 'from' to null or ''. I have prepared a small example here:
https://stackblitz.com/edit/s92ja4?file=src%2Fdatepicker-range.tsx - If you have any further questions, don't hesitate to ask.

@matthiashader matthiashader added wait for response Wait for author response and removed triage We discuss this topic in our internal weekly labels Mar 19, 2024
@karakuz
Copy link
Author

karakuz commented Mar 21, 2024

got it, thanks for code 👍

@karakuz karakuz closed this as completed Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request wait for response Wait for author response
Projects
None yet
Development

No branches or pull requests

2 participants