Skip to content

feat: add support for custom formats to date picker - #1975

Merged
sissbruecker merged 15 commits into
masterfrom
feat/date_picker_custom_formats
Aug 4, 2021
Merged

sissbruecker merged 15 commits into
masterfrom
feat/date_picker_custom_formats

Conversation

@sissbruecker

Copy link
Copy Markdown
Member

Description

Adds support for custom date formats to the DatePicker by configuring the DatePickerI18n instance.

Fixes #911

Type of change

  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs-beta/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

@fhdhsni
fhdhsni force-pushed the feat/date_picker_custom_formats branch from 2eb61c5 to ccdb41f Compare August 2, 2021 19:34
@sissbruecker
sissbruecker marked this pull request as ready for review August 4, 2021 06:55
@vaadin-bot

Copy link
Copy Markdown
Collaborator

SonarQube analysis reported 9 issues

  1. MINOR DatePicker.java#L63: Reorder the modifiers to comply with the Java Language Specification. rule
  2. MINOR DatePicker.java#L63: Remove useless curly braces around statement and then remove useless return keyword rule
  3. MINOR DatePicker.java#L67: Reorder the modifiers to comply with the Java Language Specification. rule
  4. MINOR DatePicker.java#L67: Remove useless curly braces around statement and then remove useless return keyword rule
  5. MINOR DatePicker.java#L74: Make this value-based field transient so it is not included in the serialization of this class. rule
  6. MINOR DatePicker.java#L75: Make this value-based field transient so it is not included in the serialization of this class. rule
  7. MINOR DatePickerFormatPage.java#L93: Remove useless curly braces around statement rule
  8. MINOR DatePickerFormatPage.java#L113: Remove useless curly braces around statement rule
  9. MINOR DatePickerFormatPage.java#L159: Remove useless curly braces around statement rule

@sissbruecker
sissbruecker merged commit 1c4ddf8 into master Aug 4, 2021
@sissbruecker
sissbruecker deleted the feat/date_picker_custom_formats branch August 4, 2021 09:17
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with platform 22.0.0.alpha1 and is also targeting the upcoming stable 22.0.0 version.

sissbruecker added a commit that referenced this pull request Aug 12, 2021
Added support for custom date formats to the Flow DatePicker component. The DatePickerI18N class now supports setting a custom date format that will be used for displaying dates and parsing user inputs. Optionally additional parsing formats can be specified to support entering dates in different formats.

Co-authored-by: Farhad <farhad@vaadin.com>

(cherry picked from commit 1c4ddf8)
sissbruecker added a commit that referenced this pull request Sep 9, 2021
* feat: add support for custom formats to date picker (#1975)

Added support for custom date formats to the Flow DatePicker component. The DatePickerI18N class now supports setting a custom date format that will be used for displaying dates and parsing user inputs. Optionally additional parsing formats can be specified to support entering dates in different formats.

Co-authored-by: Farhad <farhad@vaadin.com>

(cherry picked from commit 1c4ddf8)

* refactor: replace NpmPackage annotation with custom date-fns bundle

* fix node dependency versions

Co-authored-by: Zhe Sun <31067185+ZheSun88@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a method setDateFormat

5 participants