-
Notifications
You must be signed in to change notification settings - Fork 32
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
DateTime Dialog(DatePicker) not working on Physical Devices #23
Comments
The view uses by default the localized date and time pattern with the specified Defaults are like this:
Can you pass a specific Locale to the Dialog and see if it works? What is the current locale, perhaps some rules/ conditions are missing for a specific locale/ pattern? |
Hey, thanks for the reply. My current Locale is en_IN. In my case setting either of these values shows the expected result:- |
That's good! However, does that mean it couldn't generate a valid date pattern for the locale of the device? Can you figure out what the pattern was? Ideally, it should still work with the Locale.getDefault(). |
Hi @maxkeppeler upon debugging I found out that when using default values for locale and dateFromatStyle, for my locale i.e. en_IN the generated pattern is dd-MMM-y and in your com.maxkeppeler.sheets.date_time.utils.Utils.kt file for function getLocalizedValues - delimiters is missing. Due to this in PickerComponent.kt values state size is 1 and only one composable is generated. Upon changing dateFormatStyle = FormatStyle.FULL the generated pattern is EEEE, d MMMM, y and in PickerComponent.kt values state size is 4 and the output UI is as expected. |
I have to look through all the possible characters and fix this! |
The DateTime Dialog to select only dates is not working on Physical devices but it works on emulator as expected. On a physical device, it only shows to select date while month and year never shows.
The same behaviour can be seen in the sample app.
Untitled.mp4
The text was updated successfully, but these errors were encountered: