2

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>
sison kk
  • 79
  • 12

1 Answers1

0

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

sison kk
  • 79
  • 12
  • 1
    Could you elaborate? – sg7 Mar 21 '18 at 05:35
  • use the **_mdPickers.min.js_** and **_mdPickers.min.css_** from the link [link](https://github.com/dpoetzsch/md-pickers/). @sg7 . this will allow you to use the normal `required`/`ng-required` directive in `mdp-time-picker` – sison kk Mar 21 '18 at 05:43