I want to enter the time in the textbox with updown counter in it. So that i can enter the time in it. how can i do it?? A textbox with updown counter and time in it??

4 Years
Discussion Span
Last Post by kamilacbe

Um, do you mean you want up/down buttons and textbox, and clicking on the up/down buttons makes the time increase/decrease? I don't quite understand but I'll proceed on the assumption that I'm right.

You just need to add code to the two buttons so that a click reads the current time from the textbox, adds or subtracts a minute (or second, or hour, whatever you decide) from the time and then puts it back in the textbox.
The DateTime functions make the actual maths trival.

Have you got any code to show us what you've done already?


Probably, you need to use two numeric updown controls (look in the toolbox)
You can set their Minimum and Maximum properties in function of hours and minutes. Look here for a tutorial.


HI, if you are not spicify developing this is in C# , i would recomend to work this on JS which would be better..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.