-1
I use the Datetimerpicker component to use the heater and set the date, but I would like to remove the treatments of the component, because it makes it difficult to use the user, I already gave an optimized, but I wanted to improve.
-1
I use the Datetimerpicker component to use the heater and set the date, but I would like to remove the treatments of the component, because it makes it difficult to use the user, I already gave an optimized, but I wanted to improve.
0
In the Load event use this:
dt.CustomFormat = " ";
dt.Format = DateTimePickerFormat.Custom;
private void dtData_Reserva_ValueChanged(object sender, EventArgs e) {
dtData_Reserva.CustomFormat = "dd/MM/yyyy";
dtData_Reserva.Format = DateTimePickerFormat.Custom;
}
Browser other questions tagged c#
You are not signed in. Login or sign up in order to post.
What treatments?
– Laerte
The default treatment of it, for example if I type 31 in the month 02 it automatically arrow 28
– Bruno Rodrigues
This treatment also occurs when the year is leap?
– Laerte
We’re talking about Windows Forms?
– Leonel Sanches da Silva
If you want to remove these treatments, why don’t you just use a Maskedtextbox? It wouldn’t be more useful, or even easier?
– Richard Dias
@Brunorodrigues solved the problem there?
– Samuel Diogo
"I solved, "I had to create an override class using a Maskedbox and the Datetimepicker itself, it was beautiful!
– Bruno Rodrigues