[PR #971] [MERGED] DatePicker: handle AM/PM consistently #2435

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

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/971
Author: @Cosmatevs
Created: 5/9/2023
Status: Merged
Merged: 5/10/2023
Merged by: @enchev

Base: masterHead: date-picker-12-hour-format


📝 Commits (1)

  • 8ad442b DatePicker: simplify 'ToggleAmPm' function, handle AM/PM formatted hour input consistently, fix possible out-of-range values of hour/minutes/seconds on input

📊 Changes

1 file changed (+29 additions, -41 deletions)

View changed files

📝 Radzen.Blazor/RadzenDatePicker.razor.cs (+29 -41)

📄 Description

  • simplify the 'ToggleAmPm' function,
  • handle an AM/PM formatted hour input consistently (fixes #939) – note that it also prevents AM/PM from changing when you change the hour to 12,
  • fix possible out-of-range values of hour/minutes/seconds on input*

*However I couldn't reproduce #109 after disabling oninput events anyway… so perhaps the private variables hour/minutes/seconds along with related on-input functions are no longer needed?


🔄 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/971 **Author:** [@Cosmatevs](https://github.com/Cosmatevs) **Created:** 5/9/2023 **Status:** ✅ Merged **Merged:** 5/10/2023 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `date-picker-12-hour-format` --- ### 📝 Commits (1) - [`8ad442b`](https://github.com/radzenhq/radzen-blazor/commit/8ad442b2ad61f0f370b685c232ab734bfe291b2b) DatePicker: simplify 'ToggleAmPm' function, handle AM/PM formatted hour input consistently, fix possible out-of-range values of hour/minutes/seconds on input ### 📊 Changes **1 file changed** (+29 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenDatePicker.razor.cs` (+29 -41) </details> ### 📄 Description - simplify the 'ToggleAmPm' function, - handle an AM/PM formatted hour input consistently (fixes #939) – note that it also prevents AM/PM from changing when you change the hour to 12, - fix possible out-of-range values of hour/minutes/seconds on input* *However I couldn't reproduce #109 after disabling oninput events anyway… so perhaps the private variables _hour/minutes/seconds_ along with related on-input functions are no longer needed? --- <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:18:49 +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#2435