javascript to show error message if startdate is equal to enddate ext.net

This is my code: (but it is not giving my requirement, it is selecting equal dates in both the datepickers)
i need to select the date in endDateField which is greaterthan and not equal to startDateField, it should restrict to select the same dates in both the startDateField and endDateField

var onKeyUp = function () {
var me = this,
v = me.getValue(),
field;

if (me.startDateField) {
field = Ext.getCmp(me.startDateField);
field.setMaxValue(v);
me.dateRangeMax = v;
} else if (me.endDateField) {
field = Ext.getCmp(me.endDateField);
field.setMinValue(v);
me.dateRangeMin = v;
}

field.validate();
};