compose-material-dialogs icon indicating copy to clipboard operation
compose-material-dialogs copied to clipboard

Month showing as integer, not string, in selector

Open RowanG1 opened this issue 2 years ago • 1 comments
trafficstars

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:

  • Name: Samsubg S23 Ultra
  • Android Version: Android 13

Additional context Add any other context about the problem here.

RowanG1 avatar Jul 10 '23 05:07 RowanG1

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)

RowanG1 avatar Jul 12 '23 03:07 RowanG1