docs-desktop
docs-desktop copied to clipboard
DateTimePicker's Text Property
Issue description
The text property of datetimepicker is empty string before datetimepicker's handle is created.
Target framework
- [ ] .NET Core
Details
This behavior is caused by this pr : 9253
In .NET 6 and before, DateTimePicker.Text value matched displayed value:
But there was a problem that when handle is not created the text value would be an empty string, as this issue described 6590
This issue was fixed in this pr 6637. But it raised another issue.
In .NET 7+ it's valid only for DateTimePicker with custom format:

After discussion, we reached an agreement that Text should fit all formats, in the meanwhile it is acceptable that the text value is an empty string when handle is not created.