question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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): image

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): image

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: image

Looks like either the code or the documentation should be changed to be consistent.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Tanya-Solyanikcommented, Feb 2, 2022

Suggestion: Change the getter to return Value; in .NET 7 and fix documentation for other versions.

1reaction
Ashley-Licommented, Feb 24, 2022

Verified with .NET SDK 7.0.100-preview.3.22123.5 build, this issue is fixed. image

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found