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

Support for month names #60

Open
Weav3r opened this issue Jan 1, 2025 · 6 comments
Open

Support for month names #60

Weav3r opened this issue Jan 1, 2025 · 6 comments

Comments

@Weav3r
Copy link

Weav3r commented Jan 1, 2025

First off, thanks for your hard work and great package. I know this package is supposed to be as universal as possible but is it possible to consider providing support month names in the ListWheelScrollView for months such that it will be possible to display Jan, Feb, Mar, etc using date format string e.g. 'MMM' or 'MMMM' instead of the numbers. Again not imposing but hope you consider this so that we could customise the month probably using the full-names for wide screens and short names for small screens.

@mytooyo
Copy link
Owner

mytooyo commented Jan 2, 2025

@Weav3r
Thank you for using.
I believe the monthly display(Jan, Feb, Mar, ...) is quite versatile, so I will consider supporting it.

@Weav3r
Copy link
Author

Weav3r commented Jan 2, 2025

Thanks for the quick response. I've currently hacked together a temporary solution for my testing purposes (off a fork) that allows a format string and locale to be passed as customOptions. So far the only challenge will be editing values directly (see image below) but for my use case this is not a problem.

HC_158.jpg

@mytooyo
Copy link
Owner

mytooyo commented Jan 2, 2025

@Weav3r
You’re right, input might be an issue. It’s possible to suppress input as an option.
If input is necessary, I believe entering it using month names would feel natural. What do you think?

@Weav3r
Copy link
Author

Weav3r commented Jan 2, 2025

Yes, using the name of the month for input will feel natural. This would mean probably storing the month names in the map passed to generate the wheel. Also, I don't know how the locale will affect it.

For my hacky solution I just format the numeric values of the map generated for the months.

My use case doesn't require input for the months since generally there are 12 months (not that many to scroll). However, for consistency other developers may prefer the months to be editable.

@mytooyo
Copy link
Owner

mytooyo commented Jan 2, 2025

@Weav3r
Thank you. It’s important to handle locales carefully to ensure the correct date is returned. Using a Map seems effective for this, but I will consider the implementation.

To make it more versatile, input needs to align with the display, so I will add that control as well. I’ll tailor the features and implementation to suit your use case, so please allow me some time.

@Weav3r
Copy link
Author

Weav3r commented Jan 2, 2025

Thank you. I'm in no rush to have this feature btw

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

No branches or pull requests

2 participants