How do i make a check whether a date entered in a text box is greater than today's date? Format retrieved from text box e.g. 14/05/2013
Asked
Active
Viewed 2,874 times
-1
-
1Format that date to be parseable by `new Date("date string")`, then just compare with `>` against `new Date()` – Ian May 15 '13 at 16:32
-
Have you tryed something? – A. Cristian Nogueira May 15 '13 at 16:32
1 Answers
-1
var entered_date = $("#txtBox1").val();
var today = new Date();
if(entered_date>today)
{
//...
}

Antarr Byrd
- 24,863
- 33
- 100
- 188