dx-platform icon indicating copy to clipboard operation
dx-platform copied to clipboard

Build date can make some defects

Open Sky161 opened this issue 3 years ago • 0 comments

https://github.com/devexperts/dx-platform/blob/5ed039d75208c961a76f24cb83932c274c44057b/packages/react-kit/src/components/DateInput/DateInput.model.ts#L21

When we use new Date().getTime() returned mileseconds depends provided format. For example:

new Date('2021-03-29').getTime(); // 1616976000000 and it's Mon Mar 29 2021 00:00:00
new Date('2021-3-29').getTime(); // 1616965200000 and it's Sun Mar 28 2021 21:00:00

We have lag one day for the same dates.

Sky161 avatar Mar 24 '21 14:03 Sky161