logbon72 / angular-material-datetimepicker

Datepicker for Angular Material, mimick's Android's date time picker
https://logbon72.github.io/angular-material-datetimepicker
MIT License
169 stars 123 forks source link

How to set minutes? #101

Open gaharrington opened 7 years ago

gaharrington commented 7 years ago

I can not figure out how the user sets the minutes? I see the minutes hand, but can't set it.

(I tried to find documentation on this, but could not find it.)

hexadecy commented 7 years ago

You can only set minutes by jump of 5 minutes.

gaharrington commented 7 years ago

I think my question wasn't clear.

Where/how does the user click to set the minutes? (I can click the hour numbers on the clock face to set the hours, but clicking on the minute hand does nothing.)

(I tried to find documentation on this, but could not find it.)

hexadecy commented 7 years ago

Currently, you cannot click directly on the minute hand.

  1. Click on the hour numbers two times
  2. Then click on the minute numbers two times

You can also click once and ok. This issue have been reported in our software as too many clicks to set time. Also similar to issue #81

gaharrington commented 7 years ago

Is it possible to set the hour/minutes/period in code? I have tried: vm.jsDate.setHours(vm.hour);

<input mdc-datetime-picker date="true" time="false" type="text" id="datetime"
                                       ng-model="vm.jsDate" class="md-input" format="MMM DD, YYYY hh:mm A"
                                       readonly="false">
hexadecy commented 7 years ago

@gaharrington almost it!

vm.hour = 4;
vm.jsDate = new Date();
vm.jsDate.setHours(vm.hour);

or vm.jsDate = new Date('2017-06-03T04:00:00')