Date is not selected when using RazdenDatePicker in OnDemand PopupRenderMode. #1199

Closed
opened 2026-01-29 17:50:18 +00:00 by claunia · 4 comments
Owner

Originally created by @uittorio on GitHub (Apr 19, 2024).

Describe the bug

Dates are not selected when using RazdenDatePicker in OnDemand PopupRenderMode.

To Reproduce
Steps to reproduce the behavior:

  1. Go to (https://blazor.radzen.com/datepicker)
  2. Scroll down to first example
  3. Click on Edit Source
  4. Add PopupRenderMode="PopupRenderMode.OnDemand" to the RadzenDatePicker
  5. Run the new code
  6. Open the popup to select date
  7. Select a date
  8. Observe that the date is not selected

Expected behavior
Date is selected and displayed

Screenshots
image
image

Desktop (please complete the following information):

  • OS: [Linux-PopOS]
  • Browser [chrome]
  • Version [122.0.6261.111 (Official Build) (64-bit)]
  • Radzen.Blazor [4.29.8]. This is the one used by the blazor.radzen.com. View screenshot

By changing the PopupRenderMode to PopupRenderMode.Initial it works.

I've noticed that if I use the keyboard to select the day instead of the mouse it works regardless of the render mode.

I've tried to remove extra event listeners by selecting the element in the browser! I've found out that by removing a mouseup event listener the component was working as expected but I couldnt determine what code was attached to the event.

Hopefully this helps!

Originally created by @uittorio on GitHub (Apr 19, 2024). **Describe the bug** Dates are not selected when using RazdenDatePicker in OnDemand PopupRenderMode. **To Reproduce** Steps to reproduce the behavior: 1. Go to (https://blazor.radzen.com/datepicker) 2. Scroll down to first example 4. Click on Edit Source 5. Add PopupRenderMode="PopupRenderMode.OnDemand" to the RadzenDatePicker 6. Run the new code 8. Open the popup to select date 9. Select a date 10. Observe that the date is not selected **Expected behavior** Date is selected and displayed **Screenshots** ![image](https://github.com/radzenhq/radzen-blazor/assets/17477623/c9405bb4-f61f-4bb5-a481-3c0804f42b0b) ![image](https://github.com/radzenhq/radzen-blazor/assets/17477623/7537d03f-e0b1-4418-9e1d-f0f73f9a90b6) **Desktop (please complete the following information):** - OS: [Linux-PopOS] - Browser [chrome] - Version [122.0.6261.111 (Official Build) (64-bit)] - Radzen.Blazor [4.29.8]. This is the one used by the blazor.radzen.com. View screenshot By changing the PopupRenderMode to PopupRenderMode.Initial it works. I've noticed that if I use the keyboard to select the day instead of the mouse it works regardless of the render mode. I've tried to remove extra event listeners by selecting the element in the browser! I've found out that by removing a mouseup event listener the component was working as expected but I couldnt determine what code was attached to the event. Hopefully this helps!
Author
Owner

@enchev commented on GitHub (Apr 23, 2024):

Here is what I see:
dp-ondemand

@enchev commented on GitHub (Apr 23, 2024): Here is what I see: ![dp-ondemand](https://github.com/radzenhq/radzen-blazor/assets/5804953/85465364-41b9-4e69-b720-5c0bcf51e8b6)
Author
Owner

@uittorio commented on GitHub (Apr 23, 2024):

I can still reproduce it on the browser version I've mentioned above. Which browser/OS are you using? I will ask around to try it with different browsers and let you know

I've also tried on Windows Chrome and the same issue happens

Chrome -> Version 124.0.6367.61 (Official Build) (64-bit)
image

@uittorio commented on GitHub (Apr 23, 2024): I can still reproduce it on the browser version I've mentioned above. Which browser/OS are you using? I will ask around to try it with different browsers and let you know I've also tried on Windows Chrome and the same issue happens Chrome -> Version 124.0.6367.61 (Official Build) (64-bit) ![image](https://github.com/radzenhq/radzen-blazor/assets/17477623/2ea1de3d-2224-4138-b56e-a4af3d657adc)
Author
Owner

@colinbate commented on GitHub (May 20, 2024):

I am also seeing this on Windows latest Chrome and Firefox. The mouseup fires and runs Close() which closes and removes the popup, and then the click event doesn't get a chance to fire. That is why it works when you do it via keyboard: no mouseup event. The click event triggers on the enter press and runs SetDay() which contains its own call to Close().

I'm seeing this in my own application as well as the documentation example.

@colinbate commented on GitHub (May 20, 2024): I am also seeing this on Windows latest Chrome and Firefox. The `mouseup` fires and runs `Close()` which closes and removes the popup, and then the click event doesn't get a chance to fire. That is why it works when you do it via keyboard: no `mouseup` event. The `click` event triggers on the enter press and runs `SetDay()` which contains its own call to `Close()`. I'm seeing this in my own application as well as the documentation example.
Author
Owner

@enchev commented on GitHub (May 21, 2024):

Thanks @colinbate! I was able to reproduce it and will remove mouseup code.

@enchev commented on GitHub (May 21, 2024): Thanks @colinbate! I was able to reproduce it and will remove mouseup code.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1199