Loading

Limiting the numbers in a textbox

3 posts / 0 new
Last post
cidfrey's picture
Offline
Joined: 12/17/2009
Limiting the numbers in a textbox

I have this 4 textboxes

text1 = time in
text2 = time out
text3 = total number of hours work
text4 = total number of hours work in 1 month

What I want to do is to limit the numbers in text1 and text2 from 1 to 12 only. Of course inputting a number in each textbox is infinite and I want to put a range of 1 to 12 only (including the minutes ranging from 1 to 60). Is it possible to limit it? I don't have a code yet because I'm thinking of another possible way to do this. I try to download some codes related to my problem and still no answer.

Anyway, is this manually type or you can limit it? I have no more idea about this.

And also how to limit its minutes like 12:45. We know that in 1 hour there is 60 minutes. I also want to limit the minutes range 1 to 60.

Kindly please help me with this one. I don't have any idea about this. I have red many books and downloaded source codes related to this one but still no answer.

Thank you for the reply in advance.

Offline
Joined: 02/12/2010
to limit the characters, use

to limit the characters, use maxlength properties...
regarding time, better to use datetimepicker then change the view to time

cidfrey's picture
Offline
Joined: 12/17/2009
If

If I will use DTPicker I don't know how it will be coded because it will be my first time to use DTPicker. Can you guide me till this is finished?

Web / System Developer
Contacts :
09327081978
recca_flame05@yahoo.com >>> Facebook/YM
ICCT Colleges Cainta Rizal

Pages

Add new comment

Filtered HTML

  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.