Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

DateValidators problem with beforeDate, notBeforeDate, afterDate and notAfterDate #12

@magnasilvar

Description

@magnasilvar

🐞 Bug report

When using a third party library like ngx-bootstrap/datepicker :

  • time part is set to 00.00.00 when setting manually (keyboard).
  • time part is set to local time when using third component.

So, use case we only want date part to be compare (and not time part) can raise a bugged behaviour.

How repair it

  • Add 4 new validators : beforeDateTime, notBeforeDateTime, afterDateTime and notAfterDateTime.
  • Update beforeDate, notBeforeDate, afterDate and notAfterDate to compare only date part. That will lead to ⚠️ BREAKING CHANGES ⚠️ for people who used these validators for datetime.
  • Add "datetime" keyword to package.json

Tip - Use DateFormatter.toFakeSerializedDate

Metadata

Metadata

Assignees

Labels

breaking changeBreaking changebugSomething isn't workingcomp: dateConcerns @angular-stdlib/datedocumentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions