0
votes

I am trying use up and down arrow keys and calender dropdown in datetimepicker in C#.

When i am using ShowUpDown=true property of DateTimePicker control the arrow keys get enabled but the calendar Drop-Down is disabled.

So please let me know how i can use up and down keys and calender dropdown key in datetimepicker control.

1
Why make a standard tool with standard functionality unique to your application? What have you tried?SQLMason
I used ShowUpDown=true property to enable up and down arrow keys but when i use this technique, calender Drop-Down is not displaying.Swati Pandey
@user2607573 You can also use up-down keys with ShowUpDown=false, why do you think we can't use up and down keys with ShowUpDown=false?King King
So how can we use arrow keys without using ShowUpDown property. please specify it.Swati Pandey
@user2607573 why do you think we can't use arrow keys? I can use up and down arrow keys to change the value of day, month or year in DateTimePicker no matter ShowUpDown is true or false. How do you want to use the up and down arrow keys if that's not your want?King King

1 Answers

0
votes

If I understand your question, your datetimepicker has ShowUpDown=true BUT you also want the calendar drop down to appear (with some key combination).

Well you can't and this comes directly from the Help documentation of the ShowUpDown property (just press on F1 in the property window)

When the ShowUpDown property is set to true, a spin button control (also known as an up-down control), rather than a drop-down calendar, is used to adjust time values. The date and time can be adjusted by selecting each element individually and using the up and down buttons to change the value.

You get one or the other. You may want to look at datetimepicker controls from 3rd party vendors like DevExpress, they may have this combination you are looking for.