This is a migrated thread and some comments may be shown as answers.

Datepicker breaks if [min] has a time component

3 Answers 40 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 30 May 2019, 08:23 PM

This took me a while to debug this and figure out what was causing the issue, but it appears if the Date value you send to [min] has a time piece to it then the month selection breaks....temporarily.  If you use the mouse wheel to scroll between the months it works fine.  It's only if you mouse click to a new month that the calendar appears empty, but then reappears if you click again to different months.

 

I have created a stackblitz: https://stackblitz.com/edit/angular-zzgbh9

I have also attached a GIF displaying the issue since it's hard to explain, but you will see it more clearly with the GIF

 

Again, it only appears to have this odd behavior when the Date has a time piece to it.  If I create the date with no time then there doesn't seem to be any issue.

Let me know if you need anymore information.

3 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 03 Jun 2019, 09:34 AM
Hi James,

Thank you for the provided example. However, I could not reproduce the described undesired behavior (please find attached a short video of what I tried). I tested on the latest Chrome.

The only potential errors that come to mind happen when the "min" value is not earlier than the "max" value (a JavaScript error is thrown in development mode). However, this does not seem to be the case here.

If the issue is still observable on your end, can you please share some further details about the browser and browser version used, as well as make sure that the zoom level (both OS and browser) is at 100%, and that there are no third-party plugins/extensions that might interfere (running the sample in an Incognito tab is the most straight-forward option for isolating the environment). Additional information about the time zone the issue is observed in could also help us get to the bottom of the problem and determine what might be causing it.

Thank you in advance.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
James
Top achievements
Rank 1
answered on 03 Jun 2019, 05:58 PM

Hi Dimiter,

    Yes I have replicated this in all 3 major browsers (Chrome, Firefox, Edge).  I don't use firefox or edge, so those have no plugins or anything installed. 

 

The issue i see with your video is that you are "scrolling" from May to June.  Perhaps this was lost in my long post, but I did mention that scrolling works fine.  The unexpected behavior is only found when "clicking" from May to June.

 

So to reproduce: Open the date picker, mouse click June.  If you scroll then you will not see the issue.  You can see if the GIF that I am mouse clicking and not scrolling.

 

Please let me know if you have any more questions regarding the issue.  I understand this is a difficult issue to explain but I am trying my best.  If needed, perhaps we can setup some sort of remote session where I can demonstrate the issue live.

0
Dimiter Topalov
Telerik team
answered on 04 Jun 2019, 07:32 AM
Hello James,

Thank you very much for the more detailed explanation, and please accept mu apologies for initially missing the correct reproduction steps. Indeed, there seems to be an issue when the time portion of the date constructor is used, regardless of the specific values (issue is observed with 0, 0, 1 for hours, minutes, and seconds too).

I logged the bug to our issue tracker and you can track it here:

https://github.com/telerik/kendo-angular/issues/2302

I am sorry for any inconvenience caused, and I also updated your Telerik points for bringing this problem to our attention.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
DatePicker
Asked by
James
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
James
Top achievements
Rank 1
Share this question
or