Giter Site home page Giter Site logo

Comments (5)

maxkeppeler avatar maxkeppeler commented on May 14, 2024 2

I have to look through all the possible characters and fix this!
Thanks man, very helpful as I'm currently keeping myself busy with landscape layouts.

from sheets-compose-dialogs.

ankur141295 avatar ankur141295 commented on May 14, 2024 1

Hey, thanks for the reply. My current Locale is en_IN.
As you suggested changing the default values for locale or dateFormatStyle shows the dialogue's expected UI.

In my case setting either of these values shows the expected result:-
locale = Locale.UK
or
dateFormatStyle = FormatStyle.FULL/FormatStyle.LONG

from sheets-compose-dialogs.

ankur141295 avatar ankur141295 commented on May 14, 2024 1

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.

Screenshot 2023-02-04 at 10 32 37 PM

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.
Screenshot 2023-02-04 at 10 35 04 PM

from sheets-compose-dialogs.

maxkeppeler avatar maxkeppeler commented on May 14, 2024

The view uses by default the localized date and time pattern with the specified FormatStyle and Locale.
The idea was to let the view build up an input based on the pattern, the locale and the format style in the matching order of a date or time.

Defaults are like this:

    override val locale: Locale = Locale.getDefault(),
        override val dateFormatStyle: FormatStyle = FormatStyle.MEDIUM,
        override val timeFormatStyle: FormatStyle = FormatStyle.SHORT,

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?

from sheets-compose-dialogs.

maxkeppeler avatar maxkeppeler commented on May 14, 2024

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().

from sheets-compose-dialogs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.