I have an element <input type="date" ng-model="mydate" custom-date />
which I cannot modify.
The date right now is in format 'yyyy-MM-dd HH:mm:ss Z'
I need to format the date to 'yyyy-MM-dd'
. How do I write a directive to format all the elements in the application with directive "custom-date "?
Aslo I know angular has date filter https://docs.angularjs.org/api/ng/filter/date , but I dont want to use it