Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DateInput - support for more DateTimeFormat options, such as "short" for month #7776

@danielm-hpe

Description

@danielm-hpe

Is this something you or your team is interested in contributing a pull request towards?

Not sure yet

Expected Behavior

Expect to be able to format the date input to support representations like short month instead of only numeric month, because this is more usable for users. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#month

For example:
Image

Actual Behavior

The default options provided for DateInput format appear to be limited to m, mm, d, dd, and yyyy.

A storybook exists demonstrating a possible workaround via using button props https://storybook.grommet.io/?path=/story/input-dateinput-range--range&globals=theme:hpe

URL, Screenshot, or CodeSandbox

https://storybook.grommet.io/?path=/story/input-dateinput-range--range&globals=theme:hpe

Steps to Reproduce

No response

Your Environment

Grommet 2.46.1
Chrome
Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA suggestion to add to or change behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions