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

client side date validation in javascript

My input text field accepts date in the format yyyymm, i want to validate the date by checking that it is not beyond today's date and it is not more than five years ago
Aug 25 '15 #1
1 1353
Dormilich
8,658 Expert Mod 8TB
the easiest way is to use a datepicker plugin that offers those limits as settings.

otherwise, create the date objects yourself and compare them.

date in the format yyyymm, i want to validate the date by checking that it is not beyond today's date
I assume that to be a little bit tricky if there is no day part in the date.
Aug 25 '15 #2

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

Similar topics

10
by: Greg | last post by:
I'm trying to simulate server-side includes on the client-side by using JavaScript. My main problem is this: is there a way to somehow pass a variable into a directive like this: <SCRIPT...
0
by: Ron | last post by:
I've an aspx page with a custom (composite) server control and a TextBox, both with RequiredFieldValidators. I'd like the custom control to behave the same way the default TextBox does when one...
1
by: Vi | last post by:
I have a web form that is submitted using an <asp:Button> control. On this form I want to do some client side validation using the onsubmit event of the form (client side). In order to do that I'm...
1
by: Bryan | last post by:
im working on this project in asp.net using vb as the language. im building a form, and i have a bunch of validators. problem is, when i attempt to clear the form, by manually clearing fields,...
8
by: vnarayana | last post by:
Need to transfer large data (Appox 5MB in the form of XML & HTML) from Internet Explorer to Web sphere application server. Want to know if there is anyway I can compress data (JavaScript or...
3
by: Paul | last post by:
Hi all, I've been trying unsuccessfully to stop client side event validation. I've created a simple page with a text box, a required field validator and a server button with the following...
3
parshupooja
by: parshupooja | last post by:
I want to validate a date via javascript. Date should not be in future and date should not me more than seven days old. Any idea? help
4
by: parveen | last post by:
Can We read client side files using javascript? not only text files
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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,...
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...

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.