PranavMaganti / compose-material-dialogs

A Material Dialog Builder for Jetpack Compose
Other
604 stars 79 forks source link

Month showing as integer, not string, in selector #180

Open RowanG1 opened 1 year ago

RowanG1 commented 1 year ago

Describe the bug Despite setting locale to various values, like Locale.US, the selector month shows as a integer, not as a string.

To Reproduce Steps to reproduce the behaviour (including any applicable code):

  1. Launch date picker, try to look for a month like "march" to select.

Expected behaviour The month is shown as a string eg March.

Screenshots

dialog_month_1

Please complete the following information about your device:

Additional context Add any other context about the problem here.

RowanG1 commented 1 year ago

Looking at the code, this line appears to be the issue:

https://github.com/vanpra/compose-material-dialogs/blob/8c45e66933d50a782a91c85e766000ecdd6d649f/datetime/src/main/java/com/vanpra/composematerialdialogs/datetime/util/Extensions.kt#L32

instead of: this.getDisplayName(java.time.format.TextStyle.FULL, locale)