[PR #1427] [CLOSED] Refactored the inline scripts in the Date Picker #2733

Open
opened 2026-01-29 18:20:15 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1427
Author: @nosvarato
Created: 3/18/2024
Status: Closed

Base: masterHead: datePickerCSP


📝 Commits (2)

  • b4dac8a The most significant changes in the code involve the replacement of the getOpenPopup() and getOpenPopupForInput() methods in RadzenDatePicker.razor.cs with OpenPopupForButton() and OpenPopupForInput(). These new methods are asynchronous and use the JSRuntime.InvokeVoidAsync method to toggle the popup. The onclick attribute in RadzenDatePicker.razor has also been updated to use these new methods.
  • f750582 The most significant changes involve the addition of a new ClosePopUp method in the RadzenDatePicker class and modifications to the onmouseup events in the date and time pickers. The TValue attribute in the RadzenNumeric elements has also been removed.

📊 Changes

2 files changed (+24 additions, -19 deletions)

View changed files

📝 Radzen.Blazor/RadzenDatePicker.razor (+7 -7)
📝 Radzen.Blazor/RadzenDatePicker.razor.cs (+17 -12)

📄 Description

  • Change the inline scripts inside the Date Picker component to take away the need for Script-Sources unsafe-inline in the content security policy which was a penetration test finding.
  • Also removed duplicate TValues which one was set to int and one was set to double which caused errors, Remove the TValue=double as the binding value is int

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/1427 **Author:** [@nosvarato](https://github.com/nosvarato) **Created:** 3/18/2024 **Status:** ❌ Closed **Base:** `master` ← **Head:** `datePickerCSP` --- ### 📝 Commits (2) - [`b4dac8a`](https://github.com/radzenhq/radzen-blazor/commit/b4dac8a9906cda17290b00389190ac433cb6ef29) The most significant changes in the code involve the replacement of the `getOpenPopup()` and `getOpenPopupForInput()` methods in `RadzenDatePicker.razor.cs` with `OpenPopupForButton()` and `OpenPopupForInput()`. These new methods are asynchronous and use the `JSRuntime.InvokeVoidAsync` method to toggle the popup. The `onclick` attribute in `RadzenDatePicker.razor` has also been updated to use these new methods. - [`f750582`](https://github.com/radzenhq/radzen-blazor/commit/f750582981d6500b7e3e3fd92c21213f2b41afa5) The most significant changes involve the addition of a new `ClosePopUp` method in the `RadzenDatePicker` class and modifications to the `onmouseup` events in the date and time pickers. The `TValue` attribute in the `RadzenNumeric` elements has also been removed. ### 📊 Changes **2 files changed** (+24 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenDatePicker.razor` (+7 -7) 📝 `Radzen.Blazor/RadzenDatePicker.razor.cs` (+17 -12) </details> ### 📄 Description * Change the inline scripts inside the Date Picker component to take away the need for Script-Sources unsafe-inline in the content security policy which was a penetration test finding. * Also removed duplicate TValues which one was set to int and one was set to double which caused errors, Remove the TValue=double as the binding value is int --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:20:15 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2733