HandyOrg / HandyOrg/HandyControl

[Feature request] Add a TimeSpan editor - similar to TimePicker

Open
#1,285 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
7.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
The TimePicker control binds to a DateTime and only allows the specification of a 24-hour time. Further, the PropertyGrid cannot bind to a TimeSpan and there is no suitable editor built-in.

Describe the solution you'd like
A TimeSpanPicker control that binds to a TimeSpan and allows the editing of TimeSpans, including the specification of days (e.g. 15.12:00:00 for 15 and a half days). A TimeSpanPropertyEditor can then be added as the default editor for TimeSpan in a PropertyGrid.

Describe alternatives you've considered
Currently, I am creating a custom editor to achieve the same result and referencing it via an Editor attribute. However, TimeSpan is a common enough CLR type that its omission is strange. A number of other WPF libraries bind their TimePicker equivalents to TimeSpan rather than DateTime for this reason. However having a TimePicker and a new TimeSpanPicker is a reasonable compromise.

Additional context
N/A

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the existing TimePicker control and PropertyGrid editor integration. Define the scope for a TimeSpanPicker that supports days as well as hours, minutes, and seconds, then determine how a TimeSpanPropertyEditor should become the default editor for TimeSpan. Done means TimeSpan values can be edited and bound through both controls, including values such as 15.12:00:00.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.