I was initially quite excited when I began using the WinDatePicker, but now am beginning to get concerned that it is not going to allow me to do what I want it to do. In particular, it requires that the user type a leading 0 for single digits of the date. In other words, if I wanted to enter Feb 5th, 2007, I could not simply enter the following string: “2/5/07”
I would have to type the following string instead: “02/05/07” In other words, it forces me to type leading zeroes. What I would like to happen is for the user to be able to type a “/” and have the cursor auto advance to the next portion of the date. I thought that I would be able to do this with the keypressed event, but now I am having trouble discovering what the current text value of the control actually is. There is no “.text” field of the control for me to view the raw value before it is validated or turned into a date.
I tried making the EditFormatProvider be “M/d/YY” but that also requires the leading zero be typed at input time, which is not as intuitive or user-friendly as I would like it to be.
Is there a way to do what I am doing, either built-in or by inheriting/customizing this control?
Imported from legacy forums. Posted by Taytay (had 2861 views)