473,405 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Validations for TIME

I need user to input time in my specified time:

From Time hh:mm:AM/PM To Time : hh:mm:AM/PM

But both are free text

Any clues, ( other than suggesting me to change free text to dropdowns)
Nov 19 '05 #1
2 812
Try to create a Date object from the user input:

dateObject = new Date (myTextBox.value);

If the call sets datObject to NaN, the string is not a valid time.

Eliyahu

"PISCES" <PI****@discussions.microsoft.com> wrote in message
news:9E**********************************@microsof t.com...
I need user to input time in my specified time:

From Time hh:mm:AM/PM To Time : hh:mm:AM/PM

But both are free text

Any clues, ( other than suggesting me to change free text to dropdowns)

Nov 19 '05 #2
> Any clues, ( other than suggesting me to change free text to dropdowns)

This is akin to asking if there is any other way to stop a car than applying
the brakes. Yes, there are other ways. There are no other GOOD ways.

The purpose of interface elements like drop-downs, check boxes, and radio
buttons is to prevent user input error. Humans are incredibly unreliable,
and often misspell there own names (yes, the misspelling was intentional).
It is best to leave the exacting stuff to computers, which lack creativity
but are incredibly reliable at repeating exactly what they've been told.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

"PISCES" <PI****@discussions.microsoft.com> wrote in message
news:9E**********************************@microsof t.com...
I need user to input time in my specified time:

From Time hh:mm:AM/PM To Time : hh:mm:AM/PM

But both are free text

Any clues, ( other than suggesting me to change free text to dropdowns)

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Naresh Agarwal | last post by:
Hi I'm using SAX Parser of Xerces Java v2.4.0 for XML Parsing. I want to perform schema validations on the xml. The problem is that root element of XML document does not have...
2
by: Newbie | last post by:
Hi all, I am using a date time picker control in my .net application. Now I want to validate the values entered here. I want to calculate the difference of start time and end time, but start time...
0
by: babash | last post by:
I designed a site with asp.net all pages are working properly on my local computer but when I upload the sit on the server on those pages that I have field validation, Buttons doesn’t work. When...
19
by: Gérard Talbot | last post by:
posted to: alt.html and comp.infosystems.www.authoring.html followup-to: comp.infosystems.www.authoring.html Hello all, I have 2 questions about validations. 1- What's basically the...
1
by: anil kumar via .NET 247 | last post by:
(Type your message here) hi, i am using save & cancel webform buttons in my webpage to withsome validations , when i am trying to save my content it issaved that time i need a popup msg like ur...
1
by: Anup | last post by:
In my form I and doing validations using 'Javascript' as I m using ASP1.1 and there is very less support for Validators there. //Code Behind private void Page_Load(object sender,...
3
by: Sunil | last post by:
Hi, I have a from with around 8 date fields. All these are entered by the user and are to validated for holidays. The holiday validation can only be done on server side. I am planning to use...
2
by: prakashsurya | last post by:
Hello I am going through the validations in a form I would like to know the validations to be considered in writing javascript for email id so would u plz help me in writing the necessary...
2
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.