Closed solomax closed 8 months ago
DateTime.fromString can handle single y in the pattern https://github.com/Eonasdan/tempus-dominus/blob/master/src/js/datetime.ts#L767
DateTime.fromString
y
While DateTime.format can't: https://github.com/Eonasdan/tempus-dominus/blob/master/src/js/datetime.ts#L921
DateTime.format
So in case localization.format with single y is used (for ex. dd.MM.y, HH:mm:ss) The date can be parsed correctly BUT being set into input as 27.09.undefined, 14:47:41 on select
localization.format
dd.MM.y, HH:mm:ss
27.09.undefined, 14:47:41
https://codepen.io/solomax/pen/bGOeYKg
Linux
Chrome, Firefox
6.7.11, 6.7.13
en-US
Start a new pull request in StackBlitz Codeflow.
I believe the fix is trivial :)
single y should be handled exactly as yyyy :)))
yyyy
New release should fix this.
Prerequisites
Describe the issue
DateTime.fromString
can handle singley
in the pattern https://github.com/Eonasdan/tempus-dominus/blob/master/src/js/datetime.ts#L767While
DateTime.format
can't: https://github.com/Eonasdan/tempus-dominus/blob/master/src/js/datetime.ts#L921So in case
localization.format
with singley
is used (for ex.dd.MM.y, HH:mm:ss
) The date can be parsed correctly BUT being set into input as27.09.undefined, 14:47:41
on selectStackBlitz fork
https://codepen.io/solomax/pen/bGOeYKg
What operating system(s) are you seeing the problem on?
Linux
What browser(s) are you seeing the problem on?
Chrome, Firefox
What version of are you using? You can find this information from the sample StackBlitz.
6.7.11, 6.7.13
What your browser's locale? You can find this information from the sample StackBlitz.
en-US