Time validation in min:sec(000:00) 6character format

Posted by Sheetal.Swamy under jQuery on 8/9/2011 | Points: 10 | Views : 1721 | Status : [Member] | Replies : 5
Hi,
I have a two textbox in first textbox(name is txtTimePerItem) user will enter a time ,after user enters i need to calculate [60/txtTimePerItem] and display in second textbox(name is txtItemPerHour) in same min:sec(000:00) 6character format and disable the second textbox.
qusetions:
1. How to do Validation for first textbox to enter only in min:sec(000:00) 6character format?
2. After calculating [60/txtTimePerItem] ,again how to display result in same format in second textbox?

Thanks in advance

Regards,
Sheetal




Responses

Posted by: Hmanjarawala on: 8/9/2011 [Member] Bronze | Points: 25

Up
0
Down
You can validate 1st textbox by putting regular expression that will check wether proper value is inserted or not.

and in second question i'm confused

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Sheetal.Swamy, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sheetal.Swamy on: 8/9/2011 [Member] Starter | Points: 25

Up
0
Down
Thanks Hmanjarawala ,

I will explain second question with example.
Suppose user entered 6 in first textbox so i have to calculate 60/6 and diplay output in second textbox. My question is all about how to write regex for second textbox in same min:sec(000:00) 6character format.

Please will you tell me

Sheetal.Swamy, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 8/9/2011 [Member] Bronze | Points: 25

Up
0
Down
In second textbox u r not allowing any mannual entry....so regex won't work there.

and in 1st textbox also value entered in 6char format (000:00) that is min:sec ok? n in second textbox also same then what will be difference between two value?

will u explain me by giving proper example plz

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Sheetal.Swamy, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jpchoudhari on: 8/10/2011 [Member] Starter | Points: 25

Up
0
Down
hi Sheetal.Swamy,

I guess if user not entering anything in second text box then you simply don't need to validate that, whatever output is coming from value entered in first text box you can display it any format in code.

Thanks,
jay

Kind Regards,
Jay

Sheetal.Swamy, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sheetal.Swamy on: 8/12/2011 [Member] Starter | Points: 25

Up
0
Down
Ya i got your point thank you to both of you :)


Regards,
Sheetal.Swamy

Sheetal.Swamy, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response