Overriding Default Date-Time Format Behavior in date-filter Component #5878
Unanswered
jbumaniss
asked this question in
Ideas & Feature Requests
Replies: 1 comment 3 replies
-
|
Hi @crynobone. Any chance this could be implemented? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Within Laravel Nova, I've noticed that the native 'date-filter' component's date-time format automatically conforms to the browser's display language setting. The specific area of contention arises between the formats predominant in the USA and Europe:
When the browser's language is set to English US (en-US), the format appears as: 'mm/dd/yyyy'.
Conversely, for settings like English GB (en-GB), it displays as: 'dd.mm.yyyy'.
While this adaptability to the browser's language can be beneficial in many scenarios, there are instances, including in my application, where a consistent date-time format is desirable regardless of these regional variations.
Proposed Feature:
Static Date-Time Format Setting in date-filter:
Introduce the capability for developers to specify and lock in a particular date-time format for the 'date-filter' component. This format should remain consistent and uninfluenced by the browser's display language setting. Such an addition will cater to applications that aim for a standard display format across various regional settings.
Rationale:
Adjusting to browser language settings might be standard behavior, but it's imperative to acknowledge the practical needs where a consistent date-time display is beneficial. Whether catering to international audiences or ensuring uniform data representation, providing this degree of customization aligns with the adaptive and user-centric nature of Laravel Nova.
Steps to Reproduce the Current Behavior:
Deploy a fresh Laravel Nova instance.
Incorporate the native date-filter component within a Nova filter.
Switch between browser's display languages, specifically between English US (en-US) and English GB (en-GB).
Observe the shifting date-time format within the 'date-filter' based on these language preferences.
With this feature, developers can seamlessly cater to both international and region-specific audiences, ensuring a consistent and predictable user experience within Laravel Nova.
Beta Was this translation helpful? Give feedback.
All reactions