i am entering date of birth in form by entering date in separate text box ,selecting year from drop down and entering year in text box. Now i want to check that entered date
Provided that your input values are integers, you can construct a Date instance using them:
var CurrentDate = new Date();
var SelectedDate = new Date(
$('[id$=txtYear]').val(),
$('[id$=drpMonth]').val(),
$('[id$=spDate]').val()
);
//As quite rightly mentioned, January = 0, so if your inputs have the literal number for each month (1 for January) replace the line above with the following, to take a month off:
//var SelectedDate = new Date($('[id$=txtYear]').val(), $('[id$=drpMonth]').val()-1, $('[id$=spDate]').val());
if(CurrentDate > SelectedDate){
//CurrentDate is more than SelectedDate
}
else{
//SelectedDate is more than CurrentDate
}