Hi I am currently working of datetime picker input in my two textboxes.
What I want to do is, after the user choose date in the first textbox, a datetime picker of second textbox will pop up. The user does not need to click the second box.
This is my code.
html
<md-input-container>
<input time="true" date="true" mdc-datetime-picker type="text" id="date" placeholder="Start Date" ng-model="date">
</md-input-container>
<md-input-container>
<input time="true" date="true" mdc-datetime-picker type="text" id="date" placeholder="End Date" ng-model="date">
</md-input-container>
javascript
(function () {
'use strict';
angular
.controller('DemoCtrl_{{boundField.name}}', function ($scope, mdcDateTimeDialog) {
$scope.date = new Date('{{boundField.value()}}');
$scope.dateTime = new Date();
$scope.minDate = moment().subtract(1, 'month');
$scope.maxDate = moment().add(1, 'month');
$scope.displayDialog = function () {
mdcDateTimeDialog.show({
maxDate: $scope.maxDate,
time: false
})
.then(function (date) {
$scope.selectedDateTime = date;
console.log('New Date / Time selected:', date);
});
};
})
;
})();
I am new to angularjs expecially the javascript part. Your help is much appreciated. :)

