Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New component: time span picker #2037

Open
wants to merge 54 commits into
base: master
Choose a base branch
from

Conversation

Cosmatevs
Copy link
Contributor

@Cosmatevs Cosmatevs commented Mar 15, 2025

Time span picker
This pull request contains:

  • a new component, similar to the date picker in appearance, behavior, and configuration,
  • tests for the new component,
  • component style tweaks for free themes,
  • demos for the new component, covering most configuration properties,
  • an update of the form field component demo to include the new component,
  • a new helper component: PopupOrInline, which makes it much easier to handle displaying a part of the component as a popup or just inline,
  • a new enum: TimeSpanUnit used to indicate time unit fields that should be shown in the picker
  • a fix for the clear button position in the date picker inside a form field – because the implementation of that clear button is the same as in the new component
  • additional 'time' tag for the date picker in the demo list – to make it easier to find it if you want just a time picker.

Things I couldn't do:

  • component style tweaks for premium themes,
  • documentation.

To take into consideration:

  • implementing a time span filter for the data grid component.
  • implementing some solutions from my closed pull request Form field: styling fixes and tweaks #1958, especially my comment from 2025-02-28,
  • reimplementing popup/inline handling in the date picker using the PopupOrInline component in a similar way. The current solution requires a lot of micromanaging (mostly js calls) to make it work and seems prone to breaking.

* DatePicker: add readonly class only if not disabled
* read input value without using JS
* fix Value and ConfirmedValue inconsistency
* use culture while parsing
* use consistent culture in tests
TimeSpanPicker test: add event-related tests for the panel, simplify some tests related to timespan units
* prevent from changing UnconfirmedValue externally by changing Value,
* prevent from raising ValueChanged and Change events if the value haven't actually change
* revert changes in Popup component
* TimeSpanPicker: reimplement inline/popup handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants