Hello Community,
I wanted to validate Start date and enddate. For start date I will use current date to validate. But to validate EndDate I wanted the value of Startdate field.
I want to know how to read the startdate attribute value in the end date validator.
I am able to get the value of the attribute in handler, But i could not get value in the validators
"usr.usrenddatevalidator":{
"validator": function(config){
return function(control){
var date1 = new Date();
var date2 = new Date(control.value);
var date3 = startdateAttributeValue;
return (date2 < date1 || date3 >= date2) ? {"usr.usrenddatevalidator": { message: config.message }} : null;
};
},
"params":[
{"name":"message"}
],
"async":false
},
Thanks in Advance
Gargeyi.G