Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS-4437: Adding backported functionalities to DatePicker (referenceDate) #821

Merged
merged 11 commits into from
Jan 17, 2023

Conversation

czp13
Copy link
Contributor

@czp13 czp13 commented Jan 10, 2023

Description

The customer agreed to sponsor the reference date feature and backport it from our latest flow-components version:

Related support ticket:

Related GitHub ticket:

The other part of this is at the flow-components:

The issues in the customer's words:

If I set the parser pattern "ddMMyy" and the formatting pattern "dd.MM.yyyy" to the enhanced-date-picker, the following input "101070" is parsed to "10.10.2070". I think it makes more sense to parse this input to "10.10.1970" in context of date of birth, for example.
Is there a way to manually set the breakpoint where the parser switches from 2000 to 1900?

Fixes # (issue)

  • added idea files to .gitignore,
  • fixes in README.md (making more up to date based on my experience)
  • added changes to helper and mixin files,
  • added demo to presentation html so it can be tested manually
  • all tests backported as well, was harder but with help and many hours suffering, I managed to do (thanks to Ugur too in ideas),

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/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 a self-review and correct misspellings.

Additional for Feature type of change

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

- added idea files to .gitignore,
- fixes in README.md,
- added changes to helper and mixin
- some open questions and tests are missing as well,
@CLAassistant
Copy link

CLAassistant commented Jan 10, 2023

CLA assistant check
All committers have signed the CLA.

czp13 added 4 commits January 11, 2023 19:13
- gitignore new line,
- readme.md
- was importing and using _getAdjustedYear not properly, it was also not conventional,
- further fix in parseDate
- 30+ tests shall be fixed
(Note: only 2 shall remained to be fixed, on it to fix them as well)
…ted tests.

-  (Asynch tests are right now cannot be added, or at least needed to be transformed, refactored, and tested if this solution is working: Polymer/tools#1302, we need to have a specific version of Polymer as well)
@czp13 czp13 force-pushed the vs-4437-referenc-date branch from 395a634 to 2c12c55 Compare January 11, 2023 21:41
czp13 added 4 commits January 13, 2023 11:32
- In the test cases the not used variable is removed,
- Added a presentation demo, to show how the reference date is working.
- date-picker-presentation-demos html fixed, used wrong identifiers (the previous example id-s),
- _parseDate was not always reachable, now it shall be reachable from vaadin-date-picker-mixin.html always,
- 11-31 is not a real date in date picker mixin, so fixed the test.
- Asynch tests reworked (Ugur's idea around were good on assigning i18n values and how to input new values),
- Some minor changes were needed around asynchronousity and how to clean the old values when we have embedded test cases,
(I spent quite many hours today to figure out, but now all the tests are green, providing proper value)

Now all tests are working finally.
@czp13 czp13 force-pushed the vs-4437-referenc-date branch from fcb48e8 to 52b1f5e Compare January 16, 2023 17:45
czp13 and others added 2 commits January 17, 2023 11:34
Adding better wording for the new example in presentation-demos.html

Co-authored-by: Ugur Saglam <106508695+ugur-vaadin@users.noreply.github.com>
Change Date to date in the presentation-demos.html, as it is more consistent, and follows naming conventions.

Co-authored-by: Ugur Saglam <106508695+ugur-vaadin@users.noreply.github.com>
@czp13 czp13 merged commit feeeeb4 into master Jan 17, 2023
@czp13 czp13 deleted the vs-4437-referenc-date branch January 17, 2023 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants