valor-software / ngx-bootstrap

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)
https://valor-software.com/ngx-bootstrap
MIT License
5.53k stars 1.69k forks source link

Make century detection configurable #6202

Open stefan-niedermann opened 3 years ago

stefan-niedermann commented 3 years ago

Is your feature request related to a problem? Please describe.

The datepicker allows to enter a date like 02.02.02 and automatically adds the century: 02.02.2002. Unfortunately the detection of the century is currently hardcoded and switches at the year 68:

https://github.com/valor-software/ngx-bootstrap/blob/9c906398facdb5c1177e150ba3dc9414c9090086/src/chronos/units/year.ts#L71-L73

This is insufficient for our use case as we have our own company defaults

Describe the solution you'd like

Make the switching year (currently 68) configurable.

Describe alternatives you've considered

Additional context

This has been requested multiple times without an satisfying answer, for example:

vintageluke commented 5 months ago

+1