angulartimepickerrequired-field

mdp-time-picker required validation


I am trying to add a required validation to my time picker(angular material time picker). for that i have used the directive mdp-required="true". full html as follows,

 <mdp-time-picker mdp-required="true"  mdp-disabled="mode" mdp-placeholder="Start Time" mdp-open-on-click name="dateFormat" mdp-format="hh:mm A" ng-model="StartTime"></mdp-time-picker>

but the timepicker validation is not working on submit.

at the same time required validation is working for date picker yes..!

 <mdp-date-picker mdp-required="true" mdp-disabled="mode" mdp-placeholder="Start Date" mdp-open-on-click name="dateFormat" mdp-format="DD/MM/YYYY" ng-model="StartDate"></mdp-date-picker>

Solution

  • it is already implemented in latest version -- md-pickers