1

i'm very much new to angular and using this DateTimePicker by moment.js. i'cant figure out how to set the default value well in my case it is {{z.startDate}} and is not Displaying there. So How to set that default value and make it binded with ng-model.

<div ng-repeat="(key,z) in x.data">
    <input class="form-control" ng-model="z.startDate" ng-model-options="{ updateOn: 'blur' }" change="onDateChange(newValue, oldValue)" placeholder="Select a date..." value="z.startDate" moment-picker="ctrl.input" format="L">
</div>
Yash Majithiya
  • 861
  • 1
  • 8
  • 20

1 Answers1

0

We just need to pass an moment object to a particular control while working with moment controls. Moment object does not render any other values.

startDate = moment();
Yash Majithiya
  • 861
  • 1
  • 8
  • 20