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

[DateTimePicker] Date 1.1.1970 can't be set/delete from input #4432

Open
vavrinec-aspecta opened this issue Oct 11, 2024 · 1 comment
Open

Comments

@vavrinec-aspecta
Copy link

vavrinec-aspecta commented Oct 11, 2024

Description

When we write the specific value "1/1/1970 1:00 AM" ( time is depend on browser timezone ) in the input, it gets really weird. Sometimes it saves the value but cannot be deleted or it doesn't even save the value.

In general, operations with the date "1/1/1970" are bad.

Potential problem:
Apparently, somewhere there is a validation through Date.parse(input) where in the case of the date "1/1/1970" the .parse() method returns the value 0, which is in the condition false. Maybe.

Steps To Reproduce

Many ways of reproduction. This is one of them:

  • open test url
  • set "1/1/1970 1:00 AM" ( time is depend on browser timezone ) to value input in kendo date time
  • click to calendar icon

The value has been removed.

Or with setted value we can't delete it:

  • open test url
  • try delete value from input
  • click on calendar icon
  • old value is back

Test url: https://stackblitz.com/edit/angular-kitaqn-jwajrh?file=src%2Fapp%2Fapp.component.ts

Or the official URL demo: https://www.telerik.com/kendo-angular-ui/components/dateinputs/datetimepicker/events

Screenshots or video

KendoDateTimePickerProblem1.mp4

Actual Behavior

Weird behavior with "1/1/1970 1:00 AM" ( time is depend on browser timezone ) value.

Expected Behavior

Normal behavior like any other values

Browser

Chrome, Microsoft Edge

Browser version

latest

OS type

Windows

OS version

Win 11

Last working version of the Kendo UI for Angular package (if regression).

No response

@zstoyanova9
Copy link

Hi @vavrinec-aspecta, thank you for the detailed explanation.

I tried to reproduce the described issue on my side, but it seems that I can enter the mentioned date ("1/1/1970 1:00 AM") in the DateTimePicker as expected. Please check the following screen recording for reference:

chrome_X32EouKmV8.mp4

Having said that, could you please clarify the exact timezone, in which the reported issue is experienced on your side? The timezone on my side is Eastern European Summer Time (EEST), with a UTC offset of -180 minutes (UTC+3).

Thank you in advance.

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

No branches or pull requests

2 participants