Validating Times in TextBoxes with JavaScript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rajvim1914
    New Member
    • Mar 2008
    • 1

    Validating Times in TextBoxes with JavaScript

    I am having two text boxes..with Time values

    TextBox1.Text=3 :34 pm
    TextBox2.Text=3 :31 pm

    Now, what i want is ...a javascript function or validator that allow only greater Time field values in TextBox2.Text.. .

    e.g. TextBox2.Text will be more than 3:34 pm......


    Please Help!!!!!!!!!!
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by rajvim1914
    I am having two text boxes..with Time values

    TextBox1.Text=3 :34 pm
    TextBox2.Text=3 :31 pm

    Now, what i want is ...a javascript function or validator that allow only greater Time field values in TextBox2.Text.. .

    e.g. TextBox2.Text will be more than 3:34 pm......


    Please Help!!!!!!!!!!
    Hi Rajvim :)

    If you are using .NET it is strongly advised that you do server side validations along with your client side JavaScript.

    Are you using .NET at all? There are validators that you can use that automatically generate JavaScript...th ey let you enter Regular Expressions to do the checking.

    If you are not using .NET, please let me know and I'll move your question to the JavaScript forum, where you'll likely get more help on the topic.

    Another thing,

    In the future, please remember to provide a meaningful Title for any threads started (Please Use Appropriate Titles for New Threads!). This helps to ensure that other members, and also the general public, will have a better chance of finding answers to any similar questions. It will also help to get your question answered more quickly.

    Welcome to theScripts!

    -Moderator Frinny

    Comment

    Working...