Datetimepicker: manual input
-
I've been googling a while for this, but haven't found anything useful.. When a user wants to enter a date manually in a datetimepicker (dateformat short), instead of selecting a certain date, the cursor stays endlessly in the monthfield. The user has to type a "/" or press the cursor right to go to the dayfield and yearfield to type the date. I was wondering if there is a simple way of changing this behavior so the user can enter the date without having to press the cursor right button, and just input the numbers. (thus typing "10102010" instead of "10/10/2010") I can't use a masked textbox because i don't want to lose the calendarfuncionality. Does anyone have any experience with this? or are there controls available with this functionality? Thanks in advance.
-
I've been googling a while for this, but haven't found anything useful.. When a user wants to enter a date manually in a datetimepicker (dateformat short), instead of selecting a certain date, the cursor stays endlessly in the monthfield. The user has to type a "/" or press the cursor right to go to the dayfield and yearfield to type the date. I was wondering if there is a simple way of changing this behavior so the user can enter the date without having to press the cursor right button, and just input the numbers. (thus typing "10102010" instead of "10/10/2010") I can't use a masked textbox because i don't want to lose the calendarfuncionality. Does anyone have any experience with this? or are there controls available with this functionality? Thanks in advance.
Why don't you ask it on Windows Forms forum?
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
-
I've been googling a while for this, but haven't found anything useful.. When a user wants to enter a date manually in a datetimepicker (dateformat short), instead of selecting a certain date, the cursor stays endlessly in the monthfield. The user has to type a "/" or press the cursor right to go to the dayfield and yearfield to type the date. I was wondering if there is a simple way of changing this behavior so the user can enter the date without having to press the cursor right button, and just input the numbers. (thus typing "10102010" instead of "10/10/2010") I can't use a masked textbox because i don't want to lose the calendarfuncionality. Does anyone have any experience with this? or are there controls available with this functionality? Thanks in advance.
Not using the standard control. You could detect the user clicking into the edit box and swap out to a masked textbox, format the data on exit, pass the formatted value back to the dtp. You will however find there is an endless number of potential formats that you need to cater for and it will drive you absolutely nuts. Most of us have chewed on this over the years. I recommend you simply tell the user it cannot be done, unless that is you have lots of spare time and nothing to fill it.
Never underestimate the power of human stupidity RAH
-
I've been googling a while for this, but haven't found anything useful.. When a user wants to enter a date manually in a datetimepicker (dateformat short), instead of selecting a certain date, the cursor stays endlessly in the monthfield. The user has to type a "/" or press the cursor right to go to the dayfield and yearfield to type the date. I was wondering if there is a simple way of changing this behavior so the user can enter the date without having to press the cursor right button, and just input the numbers. (thus typing "10102010" instead of "10/10/2010") I can't use a masked textbox because i don't want to lose the calendarfuncionality. Does anyone have any experience with this? or are there controls available with this functionality? Thanks in advance.
-
Not using the standard control. You could detect the user clicking into the edit box and swap out to a masked textbox, format the data on exit, pass the formatted value back to the dtp. You will however find there is an endless number of potential formats that you need to cater for and it will drive you absolutely nuts. Most of us have chewed on this over the years. I recommend you simply tell the user it cannot be done, unless that is you have lots of spare time and nothing to fill it.
Never underestimate the power of human stupidity RAH
-
Is it an option to to put a masked textbox and datetimepicker one over the other with a checkbox next to them? The Checkbox would toggle the readonly (datetimepicker) or the enter value (masked textbox) on or off.
V.