I hope you used jquery datepicker try this:-
function DatePicker()
{
var startDateTextBox = $('#<%= txtFromDate.ClientID%>');
var endDateTextBox = $('#<%=txtToDate.ClientID%>');
startDateTextBox.datepicker({
dateFormat: "dd/mm/yy",
changeMonth: true,
showAnim: 'slideDown',
showOn: "focus",
numberOfMonths: 1,
separator:' ',
onClose: function(dateText, inst) {
if (endDateTextBox.val() != '') {
var testStartDate = startDateTextBox.datepicker('getDate');
var testEndDate = endDateTextBox.datepicker('getDate');
if (testStartDate > testEndDate)
endDateTextBox.datepicker('setDate', testStartDate);
}
else {
}
},
onSelect: function (selectedDateTime){
endDateTextBox.datepicker('option', 'minDate', startDateTextBox.datepicker('getDate') );
}
});
endDateTextBox.datepicker({
dateFormat: "dd/mm/yy",
changeMonth: true,
showAnim: 'slideDown',
showOn: "focus",
numberOfMonths: 1,
separator:' ',
onClose: function(dateText, inst) {
if (startDateTextBox.val() != '') {
var testStartDate = startDateTextBox.datepicker('getDate');
var testEndDate = endDateTextBox.datepicker('getDate');
if (testStartDate > testEndDate)
startDateTextBox.datepicker('setDate', testEndDate);
}
else {
}
},
onSelect: function (selectedDateTime){
startDateTextBox.datepicker('option', 'maxDate', endDateTextBox.datepicker('getDate') );
}
});
}