Code of the DateTimePicker.Text doesn't match its description in documentation
See original GitHub issue- .NET Core Version: From 3.0 to 7.0
- Have you experienced this same bug with .NET Framework?: Yes, from 2.0 to 4.8
Problem description:
Text
property of the DateTimePicker
class returns the value of the Text
property of the base class (i.e. Control
):
Yet the documentation says that Text
is an equivalent of the formatted Value
property (https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.datetimepicker.text):
This behavior is the same for all .Net versions: from .Net Framework 2.0 to .Net Core 7.0, and also documentation says the opposite thing for all of these versions. The Text
property isn’t visible at the Visual Studio designer, yet it’s visible at the IntelliSense, because it has public
modifier.
This is how it looks while debugging:
Looks like either the code or the documentation should be changed to be consistent.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
php - Datepicker not returning it's value
The datepicker is popping up and putting the date in the text area. When I call that variable to send via email it...
Read more >Can't make DatePicker output as Date instead of String
Solved: Hi I'm building a Power App which outputs the date from DatePicker to Power Automate, where a meeting is added to a...
Read more >Blazor DateTime Picker Overview - Documentation - Telerik
The Blazor DateTime Picker component allows the user to choose both a date and a time from a visual list in a dropdown,...
Read more >Datepicker
The datepicker allows users to enter a date either through text input, or by choosing a date from the calendar. It is made...
Read more ><input type="date"> - HTML: HyperText Markup Language
This code finds the first <input> element whose type is date , and sets its value to 2017-06-01 (June 1st, 2017). It then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Suggestion: Change the getter to
return Value;
in .NET 7 and fix documentation for other versions.Verified with .NET SDK 7.0.100-preview.3.22123.5 build, this issue is fixed.