473,385 Members | 1,973 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,385 software developers and data experts.

future date not allowed

Hi Sir,
I'm begener in Ajax or Javascript.I have problem about date validation.
I have 3 field in html page: 1->date(numeric), 2->month(text 1st 3 letter)
3->year(numeric). I wanna implement to validation through javascript. If user
enter future date then massege should be display "future date not allowed".
Please solve my problem.

Thank you.
Jul 19 '08 #1
1 3790
acoder
16,027 Expert Mod 8TB
You will need to create a Date object from the input. Then compare with a newly created Date object (which defaults to today's date). See this link.
Jul 19 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

242
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any...
8
by: Bob Stearns | last post by:
My client wants to disallow a birth date in the future. First I tried the obvious: ALTER TABLE IS3.ANIMALS ADD CONSTRAINT b_d_f CHECK (birth_date<=current_date) It failed because special...
2
by: asreryll | last post by:
I wish to show a future date in a table, so that I can sort and know which case is in need of a review. I can display a future date in a form but I want to see all records that are due on a certain...
1
by: ESPNSTI | last post by:
Hi, I'd like to be able to distinguish between a DateTime variable that is allowed to hold both date and time and a DateTime variable that is allowed to only hold a Date. The reason's for this...
6
by: rohayre | last post by:
Im a long time java developer and actually have never done anything with java scripting. I'd like to write a short simple script for calculating a date in the future based on today's date and a...
5
by: Kevin | last post by:
I have a simple application that handles authentication, and one of the things it checks is password aging. If I have something like this: If ("02/14/2007" <= Date.Today.ToString("MM/dd/yyyy"))...
2
by: =?Utf-8?B?Sm9ubnk=?= | last post by:
I have an ASP.NET 2.0 C# web application that is contacting an Exchange server using WEBDAV. It allows the users to look up appointments for a future date. The problem I have is determining the...
4
by: jmarcrum | last post by:
Hi everyone!! I have a continuous form that allows users to select a record and chnage the DATE that the record is assigned to another DATE within the same year. The button is called "Change plan...
7
by: jmartmem | last post by:
Greetings, I have an ASP page with a form (form1) that contains a JavaScript validation function that is activated onSubmit. The function contains a series of IF statements to alert the user to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.