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(date-textbox): allow clear by setting value to null #2050

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

LuLaValva
Copy link
Member

Description

  • Allow textbox to be cleared by setting value to null

Screenshots

image

@LuLaValva LuLaValva self-assigned this Jan 5, 2024
@@ -66,7 +66,7 @@ class DateTextbox extends Marko.Component<Input, State> {
}

onInput(input: Input) {
if (input.value) {
if (input.value !== undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to account for empty strings in this conditional?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, we shouldn't need to. An empty string would also work to clear the date textbox, but devs shouldn't be passing any strings that don't work as ISO strings.

@agliga
Copy link
Contributor

agliga commented Jan 8, 2024

This is a feature and should be targeting 13.1.0

@LuLaValva LuLaValva changed the base branch from master to 13.1.0 January 11, 2024 17:29
@agliga agliga merged commit 25e3cd8 into 13.1.0 Jan 18, 2024
1 check passed
@agliga agliga deleted the 2036-date-textbox-clear branch January 18, 2024 16:54
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.

Clear input value on date-textbox
3 participants