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

Parse custom formats when changing input text #63

Merged
merged 2 commits into from
Apr 22, 2023

Conversation

t0m3k
Copy link
Collaborator

@t0m3k t0m3k commented Feb 6, 2023

Parse custom formats when using input text

@AnalogMemory
Copy link
Contributor

Would love to fix to be added soon 🙏

@t0m3k you'll need to rebase the latest changes with this

cc @onesine

@onesine
Copy link
Owner

onesine commented Mar 14, 2023

You are right @AnalogMemory

@t0m3k
Copy link
Collaborator Author

t0m3k commented Apr 21, 2023

Fixed as of 21/04/2023 @AnalogMemory @onesine

@onesine
Copy link
Owner

onesine commented Apr 22, 2023

Hi @t0m3k 👋
Sorry for the delay.
Thanks for this PR.

@onesine onesine merged commit 82790be into onesine:master Apr 22, 2023
@walidmahade
Copy link

I see this PR is merged but still don't get the user input to trigger onchange.
@t0m3k Do I need do anything special? like a specific format?

@onesine
Copy link
Owner

onesine commented Apr 24, 2023

Hi @walidmahade 👋

Thanks for your feedback.

The PR is indeed merger, but we haven't released a new version yet. We are waiting to have a number of features before we can release a new version.

@poshiemaaat
Copy link
Contributor

@onesine could releasing be made a priority? It would be nice to have one new feature if it's ready rather than wait for a bundle 😄

@onesine
Copy link
Owner

onesine commented May 11, 2023

Hi @poshiemaaat 👋 .

I understand your concern.

So I'll publish a new release.

@poshiemaaat
Copy link
Contributor

Woo hoo! Thank you @onesine

Now that I tried it out, it does look like hard coded input slices is not necessarily working. For example, if I use

<Datepicker
      asSingle={true}
      displayFormat="MMMM D, YYYY"
/>

This doesn't update, correct? The issue is that "May 11, 2023" is more than 10 characters, making it an invalid date. I could circumvent this by removing the year for now. I'm also not entirely sure what the best solution may be; perhaps slice on either nothing or the ~ character (or custom character)?

Want me to write a bug ticket or try to create a PR?

@t0m3k t0m3k mentioned this pull request May 13, 2023
@t0m3k
Copy link
Collaborator Author

t0m3k commented May 13, 2023

@poshiemaaat thanks for input. I've created a new pull request with the issue hopefully solved. #132

I tried specifically your date format both asSingle and not and seemed to be working, as well as for other popular date formats.

I made a separate pull request, as it changes the way manual input works.

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.

5 participants