I’m working with a form
element:
<form name="formDate">
<input date-picker name="fundacao" ng-model-date="fTit.fundacao" required>
</form>
Additionally, I have created a custom directive:
app.directive('datePicker', function(){
return {
restrict: 'A',
scope: {
ngModelDate: "=ngModelDate"
},
link: function (ng, el, attr) {
// $validators HERE
}
};
})
The issue I am facing is that the "required" validation does not seem to be functioning properly due to the absence of an ng-model
directive on the element.
I am seeking suggestions on how to validate a form using nonstandard directives like in the example above. Any insights or solutions would be greatly appreciated.