|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Hi there!!
I would like to know how or any tutorials or advise to have an alert pop up if the date the user enters is this year or less. But nothing would happen if it were next years date thanks in advance |
|
#2
|
|||
|
|||
|
use as follows
new Date()//to create current date then check this date as well entered date using <,>,<=,>=,== operators .also you will need use of Date constructer with year,month,day as arguments to create a date entered byuser .the syntax is Date(year,month,date) .month is from 0-11 also you will need substring method which has syntax substring(start),substring(start,end) |
|
#3
|
||||
|
||||
|
after the date objectm use the getFullYear() method to determine what year it is. Then you'll just have to see if the year entered is <= to the current year.
|
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > checking to see if entered date is this year |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|