I Have a date in this format
16-NOV-12
From an input box with id = date.
How do I check if this date is in the past of future?
Try something like this:-
var selectedDate = $('16-Nov-12').datepicker('getDate'); var now = new Date(); if (selectedDate < now) { // selected date is in the past }