There are list of options of fields array of object.On the basis of selected value we can enable that particular input field active.But by default all input fields are readonly because novalue is selected from dropdownlist.
<!DOCTYPE html> <html xmlns=""> <head> <title></title> <script src=""></script> </head> <body ng-app="app"> <div ng-controller="controllerName"> Read field : <select ng-model="fieldname" ng-options=" as for p in fields"></select><br /><br /> Date:<input ng-readonly="fieldname!='Date'" type="date" ng-model="name2"><br /> Time:<input ng-readonly="fieldname!='Time'" type="time" ng-model="name1"><br /> Month:<input ng-readonly="true && fieldname!='Month'" type="month" ng-model="name4"><br /> Week:<input ng-readonly="fieldname!='Week'" type="week" ng-model="name3"> </div> <script> var app = angular.module("app", []); app.controller('controllerName', ['$scope', function ($scope) { $scope.fields = [{ name: 'Date' }, { name: 'Time' }, { name: 'Month' }, { name: 'Week' }]; }]); </script> </body> </html>