microsoft / microsoft/microsoft-ui-xaml

[TimePicker][DatePicker] Opened-Closed VisualStates

Open
#10,330 0 comments 0 reactions 0 assignees View on GitHub
area-DateTimePickers feature proposal team-Controls
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### **Describe the bug**
Currently, TimePicker and DatePicker controls do not have Opened-Closed VisualStates like the ComboBox control. This limitation makes it difficult to apply custom animations or styles when the popup is opened or closed, restricting flexibility in UI design and user interaction.

### **Expected Behavior:**

- Introduce Opened and Closed VisualStates for both TimePicker and DatePicker controls.
- Allow developers to trigger animations or style changes based on the open/close state of the dropdown or popup.

### **Current Behavior:**

- There are no built-in VisualStates to detect when the TimePicker or DatePicker popup is opened or closed.
- Developers have to rely on workarounds, such as event handlers, which are less intuitive and harder to maintain.

### **Example Scenario:**
When using ComboBox, developers can easily define visual transitions for opening and closing the dropdown using:

![Image](https://github.com/user-attachments/assets/efe0b0e6-eb5c-4048-abcb-7ba10700b456)

Having similar VisualStates in TimePicker and DatePicker would simplify UI customization and improve code consistency across controls.

### **Benefits:**

- Enhanced UI customization capabilities.
- Consistent behavior across commonly used controls (ComboBox, DatePicker, TimePicker).
- Simplified development workflow by reducing the need for custom workarounds.

**Thank you for considering this feature request!**

Contributor guide

Open the contributing guide

Research direction

The issue names the TimePicker and DatePicker controls and compares their behavior with ComboBox, but it does not mention files or tests. Start by locating the control templates and existing ComboBox Opened and Closed VisualStates. Done means both controls expose equivalent states that can drive animations or styles when their popups open and close.

Written by the indexing model from the issue text.

Assessment

Domain
design, desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.