angular-material-datetimepicker icon indicating copy to clipboard operation
angular-material-datetimepicker copied to clipboard

Suggestion: Type Date Time Option

Open alobban opened this issue 8 years ago • 3 comments

The ability to type in the date-time instead of being forced solely to use the picker. Some users find it faster to type in the values than having to pick it. Any PRs?

alobban avatar Jan 31 '17 19:01 alobban

You can disable the dialog for an input and use a button, alongside the mdcDateTimeDialog service to display dialog.

Somewhere on your page, you have:

<input ng-model="selectedDateTime"/> <md-button ng-click="displayDialog()">Use Picker</md-button>

Then in your controller:

      $scope.displayDialog = function () {
        mdcDateTimeDialog.show({
          maxDate: $scope.maxDate,
          time: false
        })
          .then(function (date) {
            $scope.selectedDateTime = date;
          });
      };

logbon72 avatar Feb 04 '17 19:02 logbon72

The thing missing is how to format the input without the directive. I used type="date" for the example, it works but not for "datetime".

hexadecy avatar Apr 30 '17 03:04 hexadecy

Released in our fork v1.6.7

hexadecy avatar Jun 30 '17 03:06 hexadecy